conf

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfPath config path.
	ConfPath string
	// Conf config.
	Conf *Config
)

Functions

func Init

func Init() (err error)

Init init conf

Types

type Config

type Config struct {
	XLog   *log.Config
	Tracer *trace.Config
	// HTTP
	HTTPClient        *bm.ClientConfig
	DrawyooHTTPClient *bm.ClientConfig
	// databus
	Databus *Databus
	// rpc
	RPCClient2 *RPCClient2
	// bm
	BM *bm.ServerConfig
	// mysql
	MySQL *MySQL
	// redis
	Redis *Redis
	// mc
	Memcache *Memcache
	// Host
	Host          *Host
	Weight        *Weight
	Job           *Job
	StatTypes     map[string]int8
	Es            *elastic.Config
	AccountClient *warden.ClientConfig
}

Config config.

type Databus

type Databus struct {
	Event    *databus.Config
	Stats    *databus.Config
	Consumer *databus.Config
	Like     *databus.Config
}

Databus databus.

type Host

type Host struct {
	Activity  string
	Message   string
	DrawYoo   string
	Search    string
	BlackRoom string
	LiveVC    string
	LiveAct   string
	API       string
	Bangumi   string
}

Host represents host info.

type Job

type Job struct {
	Proc        int
	SearchNum   int
	SearchFlush time.Duration
	MessageMids []int64
	BatchNumber int
}

Job job.

type Memcache

type Memcache struct {
	*memcache.Config
	Expire    time.Duration
	TopExpire time.Duration
}

Memcache mc.

type MySQL

type MySQL struct {
	Reply *sql.Config
}

MySQL mysql.

type RPCClient2

type RPCClient2 struct {
	Account *rpc.ClientConfig
	Archive *rpc.ClientConfig
	Article *rpc.ClientConfig
	Assist  *rpc.ClientConfig
}

RPCClient2 rpc client.

type Redis

type Redis struct {
	*redis.Config
	IndexExpire     time.Duration
	ReportExpire    time.Duration
	UserCntExpire   time.Duration
	StatCacheExpire time.Duration
	UserActExpire   time.Duration
	NotifyExpire    time.Duration
}

Redis redis.

type Stats

type Stats struct {
	*databus.Config
	Type  int8
	Field string
}

Stats stats.

type Weight

type Weight struct {
	Like int
	Hate int
}

Weight weight.

Jump to

Keyboard shortcuts

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