config

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

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:"cmd-lb-vl3-vpp" desc:"Name of Endpoint"`
	DialTimeout           time.Duration `default:"5s" desc:"timeout to dial NSMgr" split_words:"true"`
	RequestTimeout        time.Duration `default:"15s" desc:"timeout to request NSE" 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"`
	NetworkServices       []url.URL     `default:"" desc:"A list of Network Service Requests" split_words:"true"`
	LogLevel              string        `default:"INFO" desc:"Log level" split_words:"true"`
	OpenTelemetryEndpoint string        `default:"otel-collector.observability.svc.cluster.local:4317" desc:"OpenTelemetry Collector Endpoint"`
	MetricsExportInterval time.Duration `default:"10s" desc:"interval between mertics exports" split_words:"true"`

	Port       uint16            `default:"" desc:"TCP/UDP service port" split_words:"true"`
	TargetPort uint16            `default:"" desc:"TCP/UDP target port" split_words:"true"`
	Protocol   Protocol          `default:"TCP" desc:"TCP or UDP protocol" split_words:"true"`
	Selector   map[string]string `default:"" desc:"labels for the load balancer selector labels" split_words:"true"`
}

Config holds configuration parameters from environment variables

func (*Config) Process

func (c *Config) Process() error

Process - parses the config

type Protocol

type Protocol ip_types.IPProto

Protocol represents ip_types.IPProto

func (*Protocol) UnmarshalBinary

func (p *Protocol) UnmarshalBinary(bytes []byte) error

UnmarshalBinary unmarshal protocol name

Jump to

Keyboard shortcuts

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