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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfPath local config path
	ConfPath string
	// Conf config
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init init conf

Types

type Config

type Config struct {
	// base
	// channal len
	ChanSize int64
	// log
	Log *log.Config
	// http
	BM *bm.ServerConfig
	// identify
	AppConf *bm.App
	// tracer
	Tracer *trace.Config
	// tick load pgc
	Tick time.Duration
	// orm
	DB *DB
	//redis
	Redis *Redis
	// http client of search
	HTTPClient *HTTPClient
	// host
	Host *Host
	// rpc
	ArticleRPC *rpc.ClientConfig
	AccountRPC *rpc.ClientConfig
	VipRPC     *rpc.ClientConfig
	AccCliConf *warden.ClientConfig
	// threshold
	Threshold *Threshold
	// hbase
	HBase *HBaseConfig
	// newbie
	Newbie Newbie
}

Config str

type DB

type DB struct {
	Allowance *sql.Config
	Growup    *sql.Config
}

DB def db struct

type HBaseConfig

type HBaseConfig struct {
	*hbase.Config
	WriteTimeout time.Duration
	ReadTimeout  time.Duration
}

HBaseConfig for new hbase client.

type HTTPClient

type HTTPClient struct {
	Read *bm.ClientConfig
}

HTTPClient http client

type Host

type Host struct {
	AccountURI    string
	ArchiveURI    string
	UperURI       string
	VipURI        string
	ActivitiesURI string
	RelationsURI  string
	VideoUpURI    string
	CategoriesURI string
}

Host http host

type Newbie

type Newbie struct {
	Talents              map[string]string
	DefaultCover         string
	DefaultTalent        string
	RecommendUpCount     int
	RecommendUpPoolCount int
	ActivityCount        int
	ActivityShotType     int32
}

Newbie newbie config

type Redis

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

Redis define redis conf.

type Threshold

type Threshold struct {
	LimitFanCnt      int64
	LimitTotalClick  int64
	LimitArticleView int64
}

Threshold up cretive threshold

Jump to

Keyboard shortcuts

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