config

package
v2.0.5+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Concurrency int `yaml:"concurrency"`

	LogFile      string `yaml:"log_file"`
	LogLevel     string `yaml:"log_level"`
	PIDFile      string `yaml:"pid_file"`
	DatabaseFile string `yaml:"database_file"`
}

Config stores all config value.

func New

func New() (*Config, error)

New will create a new Config.

func (*Config) Check

func (c *Config) Check() (err error)

Check will check whether the config is vaild.

func (*Config) LoadFromContent

func (c *Config) LoadFromContent(content []byte) error

LoadFromContent will load config from file content.

func (*Config) LoadFromFilePath

func (c *Config) LoadFromFilePath(filePath string) (err error)

LoadFromFilePath will load config from specific file path.

Jump to

Keyboard shortcuts

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