config

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBackoffInterval    = 500 * time.Millisecond
	DefaultBackoffMultiplier  = 1.5
	DefaultBackoffMaxInterval = 10 * time.Second
	DefaultBackoffMaxTime     = 0
)
View Source
const (
	HTTP  = "http"
	HTTPS = "https"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackoffConfig

type BackoffConfig struct {
	Interval    time.Duration
	Multiplier  float64
	MaxInterval time.Duration
	MaxTime     time.Duration
}

type ClientConfig

type ClientConfig struct {
	ServerAddr      string
	TLSCrt          string
	TLSKey          string
	RootCA          string
	Backoff         BackoffConfig
	ClusterID       string
	KubeConfig      string
	Tunnel          *Tunnel
	ConvertUrl      string
	Token           string
	TunnelsPerAgent int
}

func LoadClientConfigFromEnv

func LoadClientConfigFromEnv() (*ClientConfig, error)

type Tunnel

type Tunnel struct {
	Name       string
	Protocol   string
	Addr       string
	RemoteAddr string

	Cfg *rest.Config
}

func GetK8sTunnelFromENV

func GetK8sTunnelFromENV() (*Tunnel, error)

func GetK8sTunnelFromFile

func GetK8sTunnelFromFile(kubeconfig string) (*Tunnel, error)

Jump to

Keyboard shortcuts

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