Documentation ¶
Index ¶
Constants ¶
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
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
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
Click to show internal directories.
Click to hide internal directories.