config

package
v0.0.0-...-81a4f0c Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHttpClientTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CF                  cf.CFConfig           `yaml:"cf"`
	Logging             helpers.LoggingConfig `yaml:"logging"`
	Server              ServerConfig          `yaml:"server"`
	Health              models.HealthConfig   `yaml:"health"`
	DB                  DBConfig              `yaml:"db"`
	DefaultCoolDownSecs int                   `yaml:"defaultCoolDownSecs"`
	LockSize            int                   `yaml:"lockSize"`
	HttpClientTimeout   time.Duration         `yaml:"http_client_timeout"`
}

func LoadConfig

func LoadConfig(reader io.Reader) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type DBConfig

type DBConfig struct {
	PolicyDB        db.DatabaseConfig `yaml:"policy_db"`
	ScalingEngineDB db.DatabaseConfig `yaml:"scalingengine_db"`
	SchedulerDB     db.DatabaseConfig `yaml:"scheduler_db"`
}

type ServerConfig

type ServerConfig struct {
	Port int             `yaml:"port"`
	TLS  models.TLSCerts `yaml:"tls"`
}

type SynchronizerConfig

type SynchronizerConfig struct {
	ActiveScheduleSyncInterval time.Duration `yaml:"active_schedule_sync_interval"`
}

Jump to

Keyboard shortcuts

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