share

package
v0.0.0-...-aab1398 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TickDelay delay between log entries
	TickDelay = time.Duration(600 * time.Second)
	// Open : State
	Open = iota
	// Closed : State
	Closed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCfg

type ClientCfg struct {
	TLSCfg
}

ClientCfg options to configure endPtDefn

func NewClientCfg

func NewClientCfg() *ClientCfg

func (*ClientCfg) Read

func (envCfg *ClientCfg) Read()

Read from env variables or command line flags

type EnvCfg

type EnvCfg interface {
	Read()
}

EnvCfg interface to configurations

type ForwarderCfg

type ForwarderCfg struct {
	Debug      bool   `json:"debug"       doc:"increase verbosity"                               default:"false"`
	Kubeconfig string `json:"kubeconfig"  doc:"kubernetes auth secrets / configuration file"     default:"cluster/auth/kubeconfig"`
	Kubernetes bool   `json:"kubernetes"  doc:"use kubernetes dynamic endpoints from service/ns" default:"true"`
	LinkDevice string `json:"linkdevice"  doc:"device for load balancers external addresses"`
}

func (*ForwarderCfg) Read

func (envCfg *ForwarderCfg) Read()

Read from env variables or command line flags

type ServerCfg

type ServerCfg struct {
	ForwarderCfg
}

ServerCfg options to configure endPtDefn

func NewServerCfg

func NewServerCfg() *ServerCfg

func (*ServerCfg) Read

func (envCfg *ServerCfg) Read()

Read from env variables or command line flags

type TLSCfg

type TLSCfg struct {
	TLS          bool   `json:"tls"           doc:"Connection uses TLS if true, else plain TCP"    default:"false"`
	HostOverride string `json:"host-override" doc:"TLS handshake host to verify with override"     default:"example.com"`
	CaFile       string `json:"ca-file"       doc:"The Root CA file"                               default:"certs/RootCA.crt"`
	CertFile     string `json:"cert-file"     doc:"The TLS cert file"                              default:"certs/example.com.crt"`
	KeyFile      string `json:"key-file"      doc:"The TLS key file"                               default:"certs/example.com.key"`
	ServerAddr   string `json:"server-addr"   doc:"The server address in the format of host:port"  default:"0.0.0.0:10000"`
}

func (*TLSCfg) LoadClientCreds

func (envCfg *TLSCfg) LoadClientCreds() credentials.TransportCredentials

LoadClientCreds from disk and initialize TLS credentials

func (*TLSCfg) LoadServerCreds

func (envCfg *TLSCfg) LoadServerCreds() grpc.ServerOption

LoadServerCreds return grpc.ServerOption

func (*TLSCfg) Read

func (envCfg *TLSCfg) Read()

Read from environment variables or command line flags and load the env configuration file endPtDefing pairs.

Jump to

Keyboard shortcuts

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