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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf is global config
	Conf = &Config{}
)

Functions

func Init

func Init() error

Init int config

Types

type Config

type Config struct {
	Version     string `toml:"version"`
	Static      string
	LocsDegrade bool
	// reload
	Reload ReloadInterval
	// app
	App *bm.App
	// Auth
	Auth *auth.Config
	// verify
	Verify *verify.Config
	// http
	BM     *HTTPServers
	Tracer *trace.Config
	// db
	MySQL *MySQL
	// rpc
	RPCClient2 *RPCClient2
	// rpc Location
	LocationRPC *rpc.ClientConfig
	// httpClient
	HTTPClient *bm.ClientConfig
	// Host
	Host *Host
	// XLog
	XLog *xlog.Config
	// DegradeConfig
	DegradeConfig *DegradeConfig
}

Config service config

type DegradeConfig

type DegradeConfig struct {
	Expire   int32
	Memcache *memcache.Config
}

DegradeConfig .

type HTTPServers

type HTTPServers struct {
	Outer *bm.ServerConfig
	Inner *bm.ServerConfig
	Local *bm.ServerConfig
}

HTTPServers Http Servers

type Host

type Host struct {
	Bangumi string
	Ad      string
}

Host defeine host info

type MySQL

type MySQL struct {
	Operation *sql.Config
	Ads       *sql.Config
	Res       *sql.Config
	Cpt       *sql.Config
}

MySQL define MySQL config

type RPCClient2

type RPCClient2 struct {
	Archive  *rpc.ClientConfig
	Account  *rpc.ClientConfig
	Resource *rpc.ClientConfig
}

RPCClient2 define RPC client config

type ReloadInterval

type ReloadInterval struct {
	Jobs   time.Duration
	Notice time.Duration
	Ad     time.Duration
}

ReloadInterval define reolad config

Jump to

Keyboard shortcuts

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