config

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (err error)

Init init config.

Types

type Config

type Config struct {
	Env             string
	Server          *HttpServer
	Trace           traceConfig.Configuration
	Modules         []Module
	Revoke          *Revoke
	AnswerRPCClient *RPCClient
	StoreRPCClient  *RPCClient
	GroupRPCClient  *RPCClient
	DeviceRPCClient *RPCClient
}
var (
	Conf *Config
)

func Default

func Default() *Config

type HttpServer

type HttpServer struct {
	Addr string
}

type Module

type Module struct {
	Name      string   `json:"name"` // enums: wallet、oa、redpacket
	IsEnabled bool     `json:"isEnabled"`
	EndPoints []string `json:"endPoints"`
}

type RPCClient

type RPCClient struct {
	RegAddrs string // etcd addrs, seperate by ','
	Schema   string
	SrvName  string // call
	Dial     xtime.Duration
	Timeout  xtime.Duration
}

RPCClient is RPC client config.

type Revoke

type Revoke struct {
	Expire xtime.Duration
}

Jump to

Keyboard shortcuts

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