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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfPath string
	Conf     = &Config{}
)

Conf info.

Functions

func Init

func Init() (err error)

Init conf.

Types

type App

type App struct {
	Key    string
	Secret string
}

App for key secret.

type Config

type Config struct {
	// bm
	BM *HTTPServers
	// db
	DB *DB
	// base
	// elk
	Xlog *log.Config
	// httpClinet
	HTTPClient *HTTPClient
	// tracer
	Tracer *trace.Config
	// Ecode
	Ecode *ecode.Config
	// host
	Host *Host
	// ArchStatus
	ArchStatus map[string]string
	// Redis
	Redis *Redis
	// Databus
	Env      string
	Consume  bool
	IsTest   bool
	UpSub    *upSub
	ChanSize int64
	Monitor  *Monitor
	// rpc client2
	ArticleRPC *rpc.ClientConfig
	// identify
	App      *blademaster.App
	Memcache *MC
	//API HOST
	API  string
	Live string
	// rpc server
	RPCServer  *rpc.ServerConfig
	GRPCServer *warden.ServerConfig
	// auth
	Auth *permit.Config
	// hbase
	HBase *HBaseConfig
	// Manager
	ManagerReport *databus.Config
	//  GRPCClient
	GRPCClient *GRPC
}

Config struct.

type DB

type DB struct {
	// Creative db
	Creative  *sql.Config
	Manager   *sql.Config
	UpCRM     *sql.Config
	ArcResult *sql.Config
	Archive   *sql.Config
}

DB conf.

type GRPC

type GRPC struct {
	Archive *warden.ClientConfig
	Account *warden.ClientConfig
}

GRPC .

type HBaseConfig

type HBaseConfig struct {
	hbase.Config
	// extra config
	ReadTimeout   time.Duration
	ReadsTimeout  time.Duration
	WriteTimeout  time.Duration
	WritesTimeout time.Duration
}

HBaseConfig combine with hbase.Config add ReadTimeout, WriteTimeout

type HTTPClient

type HTTPClient struct {
	Normal *blademaster.ClientConfig
	Slow   *blademaster.ClientConfig
}

HTTPClient conf.

type HTTPServers

type HTTPServers struct {
	Inner *blademaster.ServerConfig
}

HTTPServers for http server.

type Host

type Host struct {
	API     string
	Live    string
	Search  string
	Manager string
}

Host conf.

type MC

type MC struct {
	UpExpire        time.Duration
	UpSpecialExpire time.Duration
	Up              *memcache.Config
}

MC memcache

type Monitor

type Monitor struct {
	Host          string
	Moni          string
	UserName      string
	AppSecret     string
	AppToken      string
	IntervalAlarm time.Duration
}

Monitor conf.

type Redis

type Redis struct {
	Up *struct {
		*redis.Config
		UpExpire time.Duration
	}
}

Redis redis config

Jump to

Keyboard shortcuts

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