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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultShardID            = "CF_AUTOSCALER"
	DefaultLoggingLevel       = "info"
	DefaultAppRefreshInterval = 60 * time.Second
	DefaultHandshakeTimeout   = 500 * time.Millisecond
	DefaultKeepAliveInterval  = 5 * time.Second
	DefaultNozzleCount        = 3
	DefaultEnvelopChanSize    = 500
	DefaultEmitterBufferSize  = 500
	DefaultMaxSetupRetryCount = 10
	DefaultMaxCloseRetryCount = 10
	DefaultRetryDelay         = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppManagerConfig

type AppManagerConfig struct {
	AppRefreshInterval time.Duration     `yaml:"app_refresh_interval"`
	PolicyDB           db.DatabaseConfig `yaml:"policy_db"`
}

type Config

type Config struct {
	Logging           helpers.LoggingConfig `yaml:"logging"`
	EnvelopChanSize   int                   `yaml:"envelop_chan_size"`
	NozzleCount       int                   `yaml:"nozzle_count"`
	MetricServerAddrs []string              `yaml:"metric_server_addrs"`
	AppManager        AppManagerConfig      `yaml:"app_manager"`
	Emitter           EmitterConfig         `yaml:"emitter"`
	Nozzle            NozzleConfig          `yaml:"nozzle"`
	Health            models.HealthConfig   `yaml:"health"`
}

func LoadConfig

func LoadConfig(bytes []byte) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type EmitterConfig

type EmitterConfig struct {
	MetricsServerClientTLS *models.TLSCerts `yaml:"metrics_server_client_tls"`
	BufferSize             int              `yaml:"buffer_size"`
	KeepAliveInterval      time.Duration    `yaml:"keep_alive_interval"`
	HandshakeTimeout       time.Duration    `yaml:"handshake_timeout"`

	MaxSetupRetryCount int           `yaml:"max_setup_retry_count"`
	MaxCloseRetryCount int           `yaml:"max_close_retry_count"`
	RetryDelay         time.Duration `yaml:"retry_delay"`
}

type NozzleConfig

type NozzleConfig struct {
	RLPClientTLS *models.TLSCerts `yaml:"rlp_client_tls"`
	RLPAddr      string           `yaml:"rlp_addr"`
	ShardID      string           `yaml:"shard_id"`
}

Jump to

Keyboard shortcuts

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