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 .
	ConfPath string

	// Conf .
	Conf = &Config{}
)

Functions

func Init

func Init() (err error)

Init .

Types

type Business

type Business struct {
	Env   string
	Index bool
}

Business .

type Config

type Config struct {
	// log
	XLog *log.Config
	// tracer
	Tracer *trace.Config
	// hbase
	HBase *HBaseConfig
	// business
	Business *Business
	// xhttp
	HTTPServer *bm.ServerConfig
	// http client
	HTTPClient *bm.ClientConfig
	// database
	DB map[string]*sql.Config
	// es cluster
	Es map[string]EsInfo
	// databus
	Databus map[string]*databus.Config
	// infoc
	InfoC map[string]*infoc.Config
	// sms
	SMS *SMS
}

Config .

type Consumer

type Consumer struct {
	GroupID string
	Topic   []string
	Offset  string
	Addrs   []string
}

Consumer .

type EsInfo

type EsInfo struct {
	Addr []string
}

EsInfo (deprecated).

type HBaseConfig

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

HBaseConfig combine with hbase.Config add ReadTimeout, WriteTimeout

type Redis

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

Redis search redis.

type SMS

type SMS struct {
	Phone    string
	Token    string
	Interval int64
}

SMS config

Jump to

Keyboard shortcuts

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