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 (

	// config
	Conf = &Config{}
)

Conf global config.

Functions

func Init

func Init() (err error)

Init init conf.

Types

type Config

type Config struct {
	// base
	// customized property
	Property *Property
	// log
	Xlog *log.Config
	// db
	DB *sql.Config
	// databus
	Databus *DataSource
	// rpc to spy-service
	SpyRPC   *rpc.ClientConfig
	HBase    *HBaseConfig
	Memcache *memcache.Config
	// redis
	Redis *Redis
	// http client
	HTTPClient *bm.ClientConfig
	// HTTPServer
	HTTPServer *bm.ServerConfig
}

Config info.

type DataSource

type DataSource struct {
	EventData   *databus.Config
	SpyStatData *databus.Config
	SecLogin    *databus.Config
}

DataSource config all spy job dataSource

type HBaseConfig

type HBaseConfig struct {
	*hbase.Config
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

HBaseConfig extra hbase config

type Property

type Property struct {
	TaskTimer       time.Duration
	UserInfoShard   int64
	Debug           bool
	ConfigLoadTick  xtime.Duration
	BlockTick       xtime.Duration
	BlockWaitTick   xtime.Duration
	LoadEventTick   xtime.Duration
	BlockAccountURL string
	HistoryShard    int64
	BlockEvent      int64
	Block           *struct {
		CycleTimes int64 // unit per seconds
		CycleCron  string
	}
	ReportCron     string
	ActivityEvents []string
}

Property config for biz logic.

type Redis

type Redis struct {
	*redis.Config
	Expire        xtime.Duration
	MsgUUIDExpire xtime.Duration
}

Redis conf.

Jump to

Keyboard shortcuts

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