config

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1"
)

Variables

This section is empty.

Functions

func GetBool

func GetBool(defaultVal, val bool) bool

func GetInt

func GetInt(defaultVal, val int) int

func GetString

func GetString(defaultVal, val string) string

func Parse

func Parse(conf string) error

Types

type ConfYaml

type ConfYaml struct {
	Http           *HttpSection           `yaml:"http"`
	Rpc            *RpcSection            `yaml:"rpc"`
	RRD            rrdtool.RRDSection     `yaml:"rrd"`
	Logger         logger.LoggerSection   `yaml:"logger"`
	Migrate        migrate.MigrateSection `yaml:"migrate"`
	Index          index.IndexSection     `yaml:"index"`
	RpcClient      rpc.RpcClientSection   `yaml:"rpcClient"`
	Cache          cache.CacheSection     `yaml:"cache"`
	CallTimeout    int                    `yaml:"callTimeout"`
	IOWorkerNum    int                    `yaml:"ioWorkerNum"`
	FirstBytesSize int                    `yaml:"firstBytesSize"`
}
var (
	Config *ConfYaml
)

func GetCfgYml

func GetCfgYml() *ConfYaml

type File

type File struct {
	Filename string
	Body     []byte
}

type HttpSection

type HttpSection struct {
	Enabled bool `yaml:"enabled"`
}

type RpcSection

type RpcSection struct {
	Enabled bool `yaml:"enabled"`
}

Jump to

Keyboard shortcuts

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