Documentation ¶
Overview ¶
Package config provides methods to get configuration parameters from environment variables
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `default:"vfio-server" desc:"name of VFIO Server" split_words:"true"` BaseDir string `default:"./" desc:"base directory" split_words:"true"` ConnectTo url.URL `default:"unix:///var/lib/networkservicemesh/nsm.io.sock" desc:"url to connect to" split_words:"true"` MaxTokenLifetime time.Duration `default:"10m" desc:"maximum lifetime of tokens" split_words:"true"` RegistryClientPolicies []string `` /* 187-byte string literal not displayed */ LogLevel string `default:"INFO" desc:"Log level" split_words:"true"` OpenTelemetryEndpoint string `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint" split_words:"true"` MetricsExportInterval time.Duration `default:"10s" desc:"interval between mertics exports" split_words:"true"` CidrPrefix cidr.Groups `default:"169.254.0.0/16" desc:"List of CIDR Prefix to assign IPv4 and IPv6 addresses from" split_words:"true"` Labels map[string]string `default:"" desc:"Endpoint labels"` Payload string `default:"ETHERNET" desc:"Name of provided service payload" split_words:"true"` PprofEnabled bool `default:"false" desc:"is pprof enabled" split_words:"true"` PprofListenOn string `default:"localhost:6060" desc:"pprof URL to ListenAndServe" split_words:"true"` ServiceNames []ServiceConfig `default:"" desc:"list of supported services" split_words:"true"` RegisterService bool `default:"true" desc:"if true then registers network service on startup" split_words:"true"` }
Config holds configuration parameters from environment variables
type ServiceConfig ¶
type ServiceConfig struct { Name string MACAddr net.HardwareAddr VLANTag int32 }
ServiceConfig is a per-service config
func (*ServiceConfig) UnmarshalBinary ¶
func (s *ServiceConfig) UnmarshalBinary(bytes []byte) (err error)
UnmarshalBinary expects string(bytes) to be in format: Name: { addr: MACAddr; vlan: VLANTag; } MACAddr = xx:xx:xx:xx:xx:xx
Click to show internal directories.
Click to hide internal directories.