tunnel

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBackoffInterval    = 500 * time.Millisecond
	DefaultBackoffMultiplier  = 1.5
	DefaultBackoffMaxInterval = 60 * time.Second
	DefaultBackoffMaxTime     = 15 * time.Minute
	Protocol                  = "tcp"
	RemoteAddr                = "0.0.0.0:AUTO"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tunnel

type Tunnel struct {
	NodeRPCURL *url.URL
	NodeWSURL  *url.URL
}

Tunnel is tunnel connection with load balancer

func (*Tunnel) StartTunnel

func (t *Tunnel) StartTunnel(nodeID string, tunnelServerAddress string, token string)

type Tunneler

type Tunneler interface {
	// StartTunnel connects to load balancer tunnel port and creates connection.
	// nodeID is id that is passed in daemon,
	// tunnelServerAddress is public address of load balancer tunnel server and
	// token is jwt token given when registering with load balancer.
	StartTunnel(nodeID string, tunnelServerAddress string, token string)
}

Tunneler defines methods for connecting to load balancer tunnel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL