config

package
v1.60.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort = 3000
	DefaultHost = "0.0.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                 int               `json:"port"`
	LogLevel             string            `json:"log_level"`
	Username             string            `json:"username"`
	Password             string            `json:"password"`
	Host                 string            `json:"host"`
	RunHousekeeping      bool              `json:"run_housekeeping"`
	KeepSnapshotsForDays int               `json:"keep_snapshots_for_days"`
	CronSchedule         string            `json:"cron_schedule"`
	RDSConfig            *rdsbroker.Config `json:"rds_config"`
	TLS                  *TLSConfig        `json:"tls"`
}

func LoadConfig

func LoadConfig(configFile string) (config *Config, err error)

func (*Config) FillDefaults

func (c *Config) FillDefaults()

func (Config) TLSEnabled added in v1.56.0

func (c Config) TLSEnabled() bool

func (Config) Validate

func (c Config) Validate() error

type TLSConfig added in v1.56.0

type TLSConfig struct {
	Certificate string `json:"certificate"`
	PrivateKey  string `json:"private_key"`
}

func (*TLSConfig) GenerateTLSConfig added in v1.56.0

func (t *TLSConfig) GenerateTLSConfig() (*tls.Config, error)

GenerateTLSConfig produces a tls.Config structure out of TLSConfig. Aiming to be used while configuring a TLS client or server.

Jump to

Keyboard shortcuts

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