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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf = &Config{}
)

Conf global variable.

Functions

func Init

func Init() error

Init init conf

Types

type Config

type Config struct {
	// log
	Xlog *log.Config
	// BM
	BM *bm.ServerConfig
	// rpc server
	RPCServer *rpc.ServerConfig
	// redis
	MultiRedis *MultiRedis
	// memcache
	Memcache *Memcache
	// tracer
	Tracer *trace.Config
	// rpc client
	ArchiveRPC *rpc.ClientConfig
	AccountRPC *rpc.ClientConfig
	ArticleRPC *rpc.ClientConfig
	// httpClient
	HTTPClient *bm.ClientConfig
	// feed
	Feed *Feed
}

Config struct of conf.

type Feed

type Feed struct {
	AppLength         int
	WebLength         int
	ArchiveFeedLength int
	ArticleFeedLength int
	ArchiveFeedExpire time.Duration
	BangumiFeedExpire time.Duration
	AppPullInterval   time.Duration
	WebPullInterval   time.Duration
	ArtPullInterval   time.Duration
	BulkSize          int
	MinUpCnt          int
	MaxTotalCnt       int
}

Feed .

type Memcache

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

Memcache .

type MultiRedis

type MultiRedis struct {
	MaxArcsNum  int
	TTLUpper    time.Duration
	ExpireUpper time.Duration
	ExpireFeed  time.Duration
	Local       *redis.Config
	Cache       *redis.Config
}

MultiRedis .

Jump to

Keyboard shortcuts

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