conf

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LenStackBuf = 1024

	Conf = Config{}
)

Functions

func LoadConfig

func LoadConfig(Path string)

Types

type Config

type Config struct {
	Rpc      Rpc
	Module   map[string][]*ModuleSettings
	Mqtt     Mqtt
	Settings map[string]interface{}
}

type ModuleSettings

type ModuleSettings struct {
	Id        string
	Host      string
	ProcessID string
	Settings  map[string]interface{}
}

type Mqtt

type Mqtt struct {
	WirteLoopChanNum int // Should > 1 	    // 最大写入包队列缓存
	ReadPackLoop     int // 最大读取包队列缓存
	ReadTimeout      int // 读取超时
	WriteTimeout     int // 写入超时
}

type Rpc

type Rpc struct {
	MaxCoroutine int  //模块同时可以创建的最大协程数量默认是100
	RpcExpired   int  //远程访问最后期限值 单位秒[默认5秒] 这个值指定了在客户端可以等待服务端多长时间来应答
	Log          bool //是否打印RPC的日志
}

Jump to

Keyboard shortcuts

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