config

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 8 modules, 18 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultLockResourceKey = "routing_api_lock"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	ListenPort  uint16 `yaml:"listen_port"`
	HTTPEnabled bool   `yaml:"http_enabled"`

	MTLSListenPort     uint16 `yaml:"mtls_listen_port"`
	MTLSClientCAPath   string `yaml:"mtls_client_ca_file"`
	MTLSServerCertPath string `yaml:"mtls_server_cert_file"`
	MTLSServerKeyPath  string `yaml:"mtls_server_key_file"`
}

type Config

type Config struct {
	API                             APIConfig                 `yaml:"api"`
	AdminPort                       uint16                    `yaml:"admin_port"`
	DebugAddress                    string                    `yaml:"debug_address"`
	LogGuid                         string                    `yaml:"log_guid"`
	MetronConfig                    MetronConfig              `yaml:"metron_config"`
	MaxTTL                          time.Duration             `yaml:"max_ttl"`
	SystemDomain                    string                    `yaml:"system_domain"`
	MetricsReportingIntervalString  string                    `yaml:"metrics_reporting_interval"`
	MetricsReportingInterval        time.Duration             `yaml:"-"`
	StatsdEndpoint                  string                    `yaml:"statsd_endpoint"`
	StatsdClientFlushIntervalString string                    `yaml:"statsd_client_flush_interval"`
	StatsdClientFlushInterval       time.Duration             `yaml:"-"`
	OAuth                           OAuthConfig               `yaml:"oauth"`
	RouterGroups                    models.RouterGroups       `yaml:"router_groups"`
	ReservedSystemComponentPorts    []uint16                  `yaml:"reserved_system_component_ports"`
	FailOnRouterPortConflicts       bool                      `yaml:"fail_on_router_port_conflicts"`
	SqlDB                           SqlDB                     `yaml:"sqldb"`
	Locket                          locket.ClientLocketConfig `yaml:"locket"`
	UUID                            string                    `yaml:"uuid"`
	SkipSSLValidation               bool                      `yaml:"skip_ssl_validation"`
	LockTTL                         time.Duration             `yaml:"lock_ttl"`
	RetryInterval                   time.Duration             `yaml:"retry_interval"`
	LockResouceKey                  string                    `yaml:"lock_resource_key"`
}

func NewConfigFromBytes

func NewConfigFromBytes(bytes []byte, authDisabled bool) (Config, error)

func NewConfigFromFile

func NewConfigFromFile(configFile string, authDisabled bool) (Config, error)

type MetronConfig

type MetronConfig struct {
	Address string
	Port    string
}

type OAuthConfig

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

type SqlDB

type SqlDB struct {
	Host                   string `yaml:"host"`
	Port                   uint16 `yaml:"port"`
	Schema                 string `yaml:"schema"`
	Type                   string `yaml:"type"`
	Username               string `yaml:"username"`
	Password               string `yaml:"password"`
	CACert                 string `yaml:"ca_cert"`
	SkipSSLValidation      bool   `yaml:"-"`
	SkipHostnameValidation bool   `yaml:"skip_hostname_validation"`
	MaxIdleConns           int    `yaml:"max_idle_connections"`
	MaxOpenConns           int    `yaml:"max_open_connections"`
	ConnMaxLifetime        int    `yaml:"connections_max_lifetime_seconds"`
}

Jump to

Keyboard shortcuts

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