Documentation
¶
Index ¶
- Constants
- type Config
- type ConfigBuilder
- type EnvVarGetter
- func Bool(envName string) EnvVarGetter[bool]
- func BoolOr(envName string, def bool) EnvVarGetter[bool]
- func DurationOr(envName string, def time.Duration) EnvVarGetter[time.Duration]
- func Str(envName string) EnvVarGetter[string]
- func StrOr(envName string, def string) EnvVarGetter[string]
- func Uint16Or(envName string, def uint16) EnvVarGetter[uint16]
- type EnvVarResult
- type PropGetters
Constants ¶
View Source
const (
TLSAddrPrefix = "tls://"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { DebugLogs bool GOPSEnabled bool GOPSPort int // Enables CORS headers on http routes CORSEnabled bool E2ETestMode bool E2ELogFilesBasePath string // The address of hubble-relay instance RelayAddr string // The port which will be used to listen to on grpc server setup UIServerPort uint16 // NOTE: The delays that will be used to calculate the delay the client // should use for waiting between two poll requests (custom protocol). MinClientPollDelay time.Duration MaxClientPollDelay time.Duration TLSToRelayEnabled bool // The meaning of this flags is the same as in // https://github.com/cilium/hubble/blob/master/cmd/common/config/flags.go TLSRelayServerName string TLSRelayCACertFiles []string TLSRelayClientCertFile string TLSRelayClientKeyFile string // contains filtered or unexported fields }
func (*Config) AsRelayClientTLSConfig ¶
func (*Config) UIServerListenAddr ¶
type ConfigBuilder ¶
type ConfigBuilder struct {
// contains filtered or unexported fields
}
func New ¶
func New(log *logrus.Logger, propGetters PropGetters) *ConfigBuilder
func (*ConfigBuilder) Build ¶
func (b *ConfigBuilder) Build() (*Config, error)
type EnvVarGetter ¶
type EnvVarGetter[T any] func() EnvVarResult[T]
func Bool ¶
func Bool(envName string) EnvVarGetter[bool]
func DurationOr ¶
func Str ¶
func Str(envName string) EnvVarGetter[string]
type EnvVarResult ¶
type EnvVarResult[T any] struct { IsRequired bool IsPresented bool VarName string Value T ParseErr error }
func (*EnvVarResult[T]) Err ¶
func (er *EnvVarResult[T]) Err() error
func (*EnvVarResult[T]) LogIfFallback ¶
func (er *EnvVarResult[T]) LogIfFallback(log logrus.FieldLogger)
type PropGetters ¶
type PropGetters struct { GopsEnabled EnvVarGetter[bool] GopsPort EnvVarGetter[uint16] CorsEnabled EnvVarGetter[bool] DebugLogs EnvVarGetter[bool] RelayAddr EnvVarGetter[string] UIServerPort EnvVarGetter[uint16] TLSToRelayEnabled EnvVarGetter[bool] TLSToRelayServerName EnvVarGetter[string] TLSToRelayCACertFiles EnvVarGetter[string] TLSToRelayClientCertFile EnvVarGetter[string] TLSToRelayClientKeyFile EnvVarGetter[string] ClientPollDelays []time.Duration E2ETestModeEnabled EnvVarGetter[bool] E2ELogfilesBasepath EnvVarGetter[string] }
Click to show internal directories.
Click to hide internal directories.