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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init init config.

Types

type Config

type Config struct {
	// Env
	Env string
	//show log
	ShowLog string
	// show  XLog
	XLog *xlog.Config
	// tick time
	Tick xtime.Duration
	// tracer
	Tracer *trace.Config
	// httpClinet
	HTTPClient *bm.ClientConfig
	// httpClinetAsyn
	HTTPClientAsyn *bm.ClientConfig
	// httpData
	HTTPData *bm.ClientConfig
	// bm http
	BM *HTTPServers
	// host
	Host *Host
	// db
	MySQL *MySQL
	// redis
	Redis *Redis
	// mc
	Memcache *Memcache
	// rpc client
	ArchiveRPC *rpc.ClientConfig
	// dynamicRPC client
	DynamicRPC *rpc.ClientConfig
	// rpc account
	AccountRPC *rpc.ClientConfig
	// resource
	ResourceRPC *rpc.ClientConfig
	// relationRPC
	RelationRPC *rpc.ClientConfig
	// location rpc
	LocationRPC *rpc.ClientConfig
	// rec host
	Recommend *Recommend
	// Infoc2
	Infoc2       *infoc.Config
	FeedInfoc2   *infoc.Config
	FeedTabInfoc *infoc.Config
	// databus
	DislikeDataBus *databus.Config
	// duration
	Duration *Duration
	// BroadcastRPC grpc
	PGCRPC *warden.ClientConfig
}

type Duration

type Duration struct {
	// splash
	Splash string
	// search time_from
	Search string
}

type HTTPServers

type HTTPServers struct {
	Outer *bm.ServerConfig
}

type Host

type Host struct {
	ApiLiveCo    string
	Bangumi      string
	Hetongzi     string
	HetongziRank string
	Data         string
	ApiCo        string
	ApiCoX       string
	Ad           string
	Search       string
	Activity     string
	Dynamic      string
}

type Memcache

type Memcache struct {
	Archive *struct {
		*memcache.Config
		Expire xtime.Duration
	}
	Cards *struct {
		*memcache.Config
		Expire xtime.Duration
	}
}

type MySQL

type MySQL struct {
	Show     *sql.Config
	Resource *sql.Config
}

type Recommend

type Recommend struct {
	Host  map[string][]string
	Group map[string]int
}

type Redis

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

Jump to

Keyboard shortcuts

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