conf

package
v0.0.0-...-261bb52 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (err error)

Init is func to initial log config

Types

type BaseConf

type BaseConf struct {
	PidFile      string   `mapstructure:"pid_file"`
	PprofBind    []string `mapstructure:"pprof_bind"`
	PushChan     int      `mapstructure:"push_chan"`
	PushChanSize int      `mapstructure:"push_chan_size"`
	IsDebug      bool
	MaxProc      int
}

BaseConf is struct of base config

type CometConf

type CometConf struct {
	Key  int8   `mapstructure:"key"`
	Addr string `mapstructure:"addr"`
}

CometConf is struct of comet RPC

type Config

type Config struct {
	Base  *BaseConf   `mapstructure:"base"`
	Log   *log.Config `mapstructure:"log"`
	Redis *RedisConf  `mapstructure:"redis"`
	Comet []CometConf `mapstructure:"comet"`
}

Config is struct of config struct

var (
	// Conf is  var of job config
	Conf *Config
)

func NewConfig

func NewConfig() *Config

NewConfig is func to create a Config

type RedisConf

type RedisConf struct {
	Address   string `mapstructure:"address"`
	Password  string `mapstructure:"password"`
	DefaultDB int    `mapstructure:"default_db"`
}

RedisConf is struct of redis config

Jump to

Keyboard shortcuts

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