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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Conf store the global config
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init init conf.

func ReloadEvents

func ReloadEvents() <-chan bool

ReloadEvents return the reload chan

Types

type Config

type Config struct {
	Tracer     *trace.Config
	BM         *bm.ServerConfig
	HTTPClient *bm.ClientConfig
	Memcache   *Memcache
	Redis      *redis.Config
	HBase      *HBaseConfig
	Log        *log.Config
	Property   *Property
	sync.RWMutex
	// orm
	ORM *orm.Config
}

Config def.

type HBaseConfig

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

HBaseConfig for new hbase client.

type Memcache

type Memcache struct {
	MR             *memcache.Config
	MRRecordExpire xtime.Duration
}

Memcache config.

type Property

type Property struct {
	TaskInterval xtime.Duration // 任务轮询时间
	TaskTimeout  xtime.Duration // 任务超时时间
	PollPipeline xtime.Duration //pipeline轮询间隔时间
	Gitlab       *struct {
		API   string // gitlab api host
		Token string // saga 账户 access token
	}
	WebHooks []*model.WebHook
	Mail     *struct {
		Host    string
		Port    int
		Address string
		Pwd     string
		Name    string
	}
	HealthCheck *struct {
		CheckCron  string
		AlertAddrs []*model.MailAddress
	}
	ReportRequiredVisible *struct {
		CheckCron  string
		AlertAddrs []*model.MailAddress
	}
	SyncContact *struct {
		CheckCron string
	}
	UT *struct {
		Rate float64
	}
	Wechat  *model.AppConfig
	Contact *model.AppConfig
	Repos   []*model.RepoConfig
}

Property config for biz logic.

Jump to

Keyboard shortcuts

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