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

This section is empty.

Functions

func Init

func Init() (err error)

Init init conf

Types

type Config

type Config struct {
	// base
	// log
	Log *log.Config
	App *bm.App
	// favorite config
	Fav      *Fav
	Platform *Platform
	// BM blademaster
	BM *bm.ServerConfig
	// rpc server2
	RPCServer *rpc.ServerConfig
	// db
	MySQL *MySQL
	// redis
	Redis *Redis
	// memcache
	Memcache *Memcache
	// databus
	JobDatabus *databus.Config
	// verify
	Verify *verify.Config
	// rpc client
	RPCClient2 *RPC
	// tracer
	Tracer *trace.Config
	// http client
	HTTPClient *bm.ClientConfig
	// ecode
	Ecode *ecode.Config
	// TopicClient
	Topic *Topic
	// Antispam
	Antispam *antispam.Config
	// Supervisior
	Supervisor *supervisor.Config
	// collector
	Infoc2 *infoc.Config
	//grpc warden
	WardenServer *warden.ServerConfig
}

Config is favorte conf

var (

	// Conf Config
	Conf *Config
)

type Fav

type Fav struct {
	// the max of the num of favorite folders
	MaxFolders      int
	MaxPagesize     int
	MaxBatchSize    int
	MaxDataSize     int
	MaxParallelSize int
	MaxRecentSize   int
	MaxNameLen      int
	MaxDescLen      int
	// the num of operation
	MaxOperationNum int
	// the num of default favorite
	DefaultFolderLimit int
	NormalFolderLimit  int
	// ApiHost api.bilibili.co .
	APIHost string
	// cache expire
	Expire time.Duration
	// cdtime cool down time
	CleanCDTime time.Duration
	// real-name switch
	RealNameOn bool
}

Fav config

type Memcache

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

Memcache memcache conf

type MySQL

type MySQL struct {
	// favorite db
	Fav  *sql.Config
	Read *sql.Config
	Push *sql.Config
}

MySQL is mysql conf

type Platform

type Platform struct {
	MaxFolders int
	MaxNameLen int
	MaxDescLen int
}

Platform config

type RPC

type RPC struct {
	Account *warden.ClientConfig
	Archive *rpc.ClientConfig
	Filter  *rpc.ClientConfig
	Rank    *rpc.ClientConfig
}

RPC contain all rpc conf

type Redis

type Redis struct {
	*redis.Config
	Expire      time.Duration
	CoverExpire time.Duration
}

Redis redis conf

type Topic

type Topic struct {
	TopicURL   string
	HTTPClient *bm.ClientConfig
}

Topic Topic

Jump to

Keyboard shortcuts

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