config

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 2 Imported by: 15

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 NetConf

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

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"`
}

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"`
}

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