config

package
v0.0.0-...-dd9aec0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DebugServerPort               int       `json:"debug_server_port" validate:"min=1"`
	ListenHost                    string    `json:"listen_host" validate:"nonzero"`
	ListenPort                    int       `json:"listen_port" validate:"nonzero"`
	CACertFile                    string    `json:"ca_cert_file" validate:"nonzero"`
	ServerCertFile                string    `json:"server_cert_file" validate:"nonzero"`
	ServerKeyFile                 string    `json:"server_key_file" validate:"nonzero"`
	Network                       string    `json:"network" validate:"nonzero"`
	SubnetPrefixLength            int       `json:"subnet_prefix_length" validate:"nonzero"`
	Database                      db.Config `json:"database" validate:"nonzero"`
	LeaseExpirationSeconds        int       `json:"lease_expiration_seconds" validate:"min=1"`
	MetronPort                    int       `json:"metron_port" validate:"min=1"`
	HealthCheckPort               int       `json:"health_check_port" validate:"min=1"`
	MetricsEmitSeconds            int       `json:"metrics_emit_seconds" validate:"min=1"`
	StalenessThresholdSeconds     int       `json:"staleness_threshold_seconds" validate:"min=1"`
	LogPrefix                     string    `json:"log_prefix" validate:"nonzero"`
	MaxIdleConnections            int       `json:"max_idle_connections" validate:"min=0"`
	MaxOpenConnections            int       `json:"max_open_connections" validate:"min=0"`
	MaxConnectionsLifetimeSeconds int       `json:"connections_max_lifetime_seconds" validate:"min=0"`
}

func ReadFromFile

func ReadFromFile(configFilePath string) (*Config, error)

func (*Config) WriteToFile

func (c *Config) WriteToFile(configFilePath string) error

Jump to

Keyboard shortcuts

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