Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

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

	MTLSListenPort     int    `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                       int                       `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"`
	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"`
}

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              int    `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                   int    `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"`
}

Source Files