config

package
v0.0.0-...-3216bbb Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

View Source
const DrainWaitDefault = 20 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendTLSConfig

type BackendTLSConfig struct {
	Enabled              bool   `yaml:"enabled"`
	CACertificatePath    string `yaml:"ca_cert_path"`
	ClientCertAndKeyPath string `yaml:"client_cert_and_key_path"`
}

type Config

type Config struct {
	OAuth                        OAuthConfig      `yaml:"oauth"`
	RoutingAPI                   RoutingAPIConfig `yaml:"routing_api"`
	HaProxyPidFile               string           `yaml:"haproxy_pid_file"`
	IsolationSegments            []string         `yaml:"isolation_segments"`
	ReservedSystemComponentPorts []uint16         `yaml:"reserved_system_component_ports"`
	DrainWaitDuration            time.Duration    `yaml:"drain_wait"`
	BackendTLS                   BackendTLSConfig `yaml:"backend_tls"`
}

func New

func New(path string) (*Config, error)

type OAuthConfig

type OAuthConfig struct {
	TokenEndpoint     string `yaml:"token_endpoint"`
	Port              uint16 `yaml:"port"`
	SkipSSLValidation bool   `yaml:"skip_ssl_validation"`
	ClientName        string `yaml:"client_name"`
	ClientSecret      string `yaml:"client_secret"`
	CACerts           string `yaml:"ca_certs"`
}

type RoutingAPIConfig

type RoutingAPIConfig struct {
	URI          string `yaml:"uri"`
	Port         uint16 `yaml:"port"`
	AuthDisabled bool   `yaml:"auth_disabled"`

	ClientCertificatePath string `yaml:"client_cert_path"`
	ClientPrivateKeyPath  string `yaml:"client_private_key_path"`
	CACertificatePath     string `yaml:"ca_cert_path"`
}

Jump to

Keyboard shortcuts

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