config

package
v0.0.0-...-3042244 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigByField

func GetConfigByField(section string) (interface{}, error)

Types

type Config

type Config struct {
	Logging struct {
		Level      string `yaml:"level"`
		Path       string `yaml:"path"`
		MaxSize    string `yaml:"max_size"`
		MaxAge     string `yaml:"max_age"`
		MaxBackups int    `yaml:"max_backups"`
	} `yaml:"logging"`
	Store struct {
		MaxKeyAge         string `yaml:"max_key_age"`
		MaxSize           string `yaml:"max_size"`
		MaxAllowedEntries int    `yaml:"max_allowed_entries"`
	} `yaml:"state"`
	Server struct {
		Adress string `yaml:"adress"`
		Port   int    `yaml:"port"`
		SSL    bool   `yaml:"ssl"`
	} `yaml:"server"`
	Persistence struct {
		Path             string `yaml:"path"`
		SnapshotInterval int    `yaml:"snapshot_interval"`
		Enabled          bool   `yaml:"enabled"`
		AppendOnly       bool   `yaml:"append_only"`
	} `yaml:"persistence"`
}

func LoadConfig

func LoadConfig() *Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳