config

package
v4.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugConf

type DebugConf struct {
	Pprof  bool `yaml:"pprof"`
	Allocs bool `yaml:"allocs"`
}

type LoggerConf

type LoggerConf struct {
	ServerLog string `yaml:"serverlog"`
	CoreLog   string `yaml:"corelog"`
	HTTPLog   string `yaml:"httplog"`
	RPCLog    string `yaml:"rpclog"`
	LogLevel  string `yaml:"loglevel"`
}

type MetricsConf

type MetricsConf struct {
	Prometheus       bool  `yaml:"prometheus"`
	CollectPeriod    int64 `yaml:"collect_period"`
	ClientsStats     bool  `yaml:"clientsstats"`
	ReplicationStats bool  `yaml:"replicationstats"`
}

type NetConf

type NetConf struct {
	HTTPAddr    string `yaml:"httpaddr"`
	RPCAddr     string `yaml:"rpcaddr"`
	WebRoot     string `yaml:"webroot"`
	Security    bool   `yaml:"security"`
	RAFTCluster bool   `yaml:"enable_cluster"`
}

type ServerConfig

type ServerConfig struct {
	Storage StorageConf `yaml:"storage"`
	Net     NetConf     `yaml:"net"`
	Logger  LoggerConf  `yaml:"logger"`
	System  SystemConf  `yaml:"system"`
	Debug   DebugConf   `yaml:"debug"`
	Metrics MetricsConf `yaml:"metrics"`
}

func DefaultServerConfig

func DefaultServerConfig() *ServerConfig

func (*ServerConfig) GetYamlString

func (cfg *ServerConfig) GetYamlString() (string, error)

type StorageConf

type StorageConf struct {
	Path            string `yaml:"path"`
	Engine          string `yaml:"engine"`
	StartWithErrors bool   `yaml:"startwitherrors"`
	Autorepair      bool   `yaml:"autorepair"`
}

type SystemConf

type SystemConf struct {
	User string `yaml:"user"`
}

Jump to

Keyboard shortcuts

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