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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf export config variable
	Conf = &Config{}
)

Functions

func Init

func Init() error

Init int config

Types

type Config

type Config struct {
	// base
	// ecode
	Ecode *ecode.Config
	// xlog
	Xlog   *log.Config
	Auth   *auth.Config
	Verify *verify.Config
	// http client
	HTTPClient *bm.ClientConfig
	ArchiveRPC *rpc.ClientConfig
	AccountRPC *warden.ClientConfig
	AssistRPC  *rpc.ClientConfig
	DMRPC      *rpc.ClientConfig
	// http server
	HTTPServer *bm.ServerConfig
	// db
	DB *DB
	// redis
	Redis *Redis
	// tracer
	Tracer *trace.Config
	// databus
	Databus *databus.Config
	// Antispam
	Antispam *antispam.Config
	Host     Host
	ES       *elastic.Config
}

Config dm config file

type DB

type DB struct {
	DM           *sql.Config
	DMMetaReader *sql.Config
	DMWriter     *sql.Config
}

DB mysql database instance

type DMRedis

type DMRedis struct {
	*redis.Config
	DMIDExpire  time.Duration
	LockExpire  time.Duration
	IndexExpire time.Duration
	VideoExpire time.Duration
}

DMRedis redis instance of dm

type Host

type Host struct {
	API     string
	Archive string
	Message string
}

Host hosts used in dm admin

type Redis

type Redis struct {
	DM *DMRedis
}

Redis redis instance

Jump to

Keyboard shortcuts

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