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{}
)

Conf global variable.

Functions

func Init

func Init() (err error)

Init create config instance.

Types

type Config

type Config struct {
	// app
	App *bm.App
	// tracer
	Tracer *trace.Config
	// goroutine sleep
	Tick time.Duration
	// http server
	BM *bm.ServerConfig
	// log
	Log *log.Config
	// verify
	Verify      *verify.Config
	LocationRPC *rpc.ClientConfig
	DataBus     *databus.Config
	Mysql       *Mysql
	Expect      *Expect
	// redis
	Redis *Redis
	// httpClient
	HTTPClient *bm.ClientConfig
	// rpc
	RPCServer *rpc.ServerConfig
	// HBase
	HBase *HBaseConfig
	// mc
	Memcache *Memcache
}

Config struct of conf.

type Expect

type Expect struct {
	Top         int64 // login loc count.
	Count       int64 // login time count.
	CloseCount  int64 // user close count.
	Rand        int64 // rand ratio
	DoubleCheck int64 // double login check location count.
}

Expect Login expection config.

type HBaseConfig

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

HBaseConfig extra hbase config for compatible

type Memcache

type Memcache struct {
	*memcache.Config
	Expire time.Duration
}

Memcache mc config.

type Mysql

type Mysql struct {
	Secure *sql.Config
	DDL    *sql.Config
}

Mysql conf.

type Redis

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

Redis redis conf.

Jump to

Keyboard shortcuts

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