client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBackoffInterval    = 500 * time.Millisecond
	DefaultBackoffMultiplier  = 1.5
	DefaultBackoffMaxInterval = 60 * time.Second
	DefaultBackoffMaxTime     = 15 * time.Minute
)

Default backoff configuration.

Variables

This section is empty.

Functions

func Command

func Command() *flag.FlagSet

func CompleteArgs

func CompleteArgs(fs *flag.FlagSet) error

func Execute

func Execute() error

Types

type BackoffConfig

type BackoffConfig struct {
	Interval    time.Duration `yaml:"interval"`
	Multiplier  float64       `yaml:"multiplier"`
	MaxInterval time.Duration `yaml:"max_interval"`
	MaxTime     time.Duration `yaml:"max_time"`
}

BackoffConfig defines behavior of staggering reconnection retries.

type ClientConfig

type ClientConfig struct {
	ServerAddr string             `yaml:"server_addr"`
	Backoff    BackoffConfig      `yaml:"backoff"`
	Tunnels    map[string]*Tunnel `yaml:"tunnels"`
}

ClientConfig is a tunnel client configuration.

type Tunnel

type Tunnel struct {
	Protocol   string `yaml:"proto,omitempty"`
	Addr       string `yaml:"addr,omitempty"`
	RemoteAddr string `yaml:"remote_addr,omitempty"`
}

Tunnel defines a tunnel.

Jump to

Keyboard shortcuts

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