config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	URL  string `yaml:"url"`
	Auth struct {
		Username string `yaml:"username"`
		Password string `yaml:"password"`
	} `yaml:"auth"`
}

type Config

type Config struct {
	Bind            string        `env:"BIND"                   yaml:"bind"`
	Backend         *Backend      `yaml:"backend"`
	EnableIPv6      bool          `yaml:"ipv6"`
	HTTPErrorCode   int           `yaml:"httpErrorCode"`
	Selector        LabelSelector `yaml:"selector,omitempty"`
	Timeout         time.Duration `yaml:"timeout"`
	TimeoutShutdown time.Duration `yaml:"timeoutShutdown"`
	Concurrency     int           `yaml:"concurrency"`
	Metadata        bool          `yaml:"metadata"`
	MaxConnDuration time.Duration `yaml:"maxConnectionDuration"`
	MaxConnsPerHost int           `yaml:"maxConnectionsPerHost"`
	Tenant          *TenantConfig `yaml:"tenant"`
	PipeIn          *fhu.InmemoryListener
	PipeOut         *fhu.InmemoryListener
}

func Load

func Load(file string) (*Config, error)

type LabelSelector

type LabelSelector struct {
	MatchLabels      map[string]string          `yaml:"matchLabels,omitempty"`
	MatchExpressions []LabelSelectorRequirement `yaml:"matchExpressions,omitempty"`
}

func (*LabelSelector) Selector

func (l *LabelSelector) Selector() *metav1.LabelSelector

type LabelSelectorRequirement

type LabelSelectorRequirement struct {
	Key      string   `yaml:"key"`
	Operator string   `yaml:"operator"`
	Values   []string `yaml:"values,omitempty"`
}

type TenantConfig

type TenantConfig struct {
	Labels                []string `yaml:"labels"`
	SetNamespaceAsDefault bool     `yaml:"setNamespaceAsDefault"`
	Prefix                string   `yaml:"prefix"`
	PrefixPreferSource    bool     `yaml:"prefixPreferSource"`
	LabelRemove           bool     `yaml:"labelRemove"`
	Header                string   `yaml:"header"`
	Default               string   `yaml:"default"`
	AcceptAll             bool     `yaml:"acceptAll"`
}

Jump to

Keyboard shortcuts

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