conf

package
v0.0.0-...-833a7b1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 7 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 {
	Name        string
	Rpc         Rpc
	Module      map[string][]*ModuleSettings
	Master      Master
	Debug       bool
	DB          DB
	PrivateKey  string
	Secret      bool
	OnlineLimit int32
}

type DB

type DB struct {
	DBtype string
	SQL    string
	Redis  string
}

type InfluxDBConfig

type InfluxDBConfig struct {
	DBName    string
	UserName  string
	Password  string
	Addr      string
	Precision string
	Enable    bool
}

type Master

type Master struct {
	ISRealMaster    bool
	RedisUrl        string
	DBConfig        *InfluxDBConfig
	RedisPubSubConf *Redis
	Enable          bool
}

type ModuleSettings

type ModuleSettings struct {
	Id        string
	ByteID    byte
	Host      string
	ProcessID string
	Settings  map[string]interface{}
	Rabbitmq  *Rabbitmq
	Redis     *Redis
}

type Process

type Process struct {
	ProcessID string
	Host      string
	//执行文件
	Execfile string
	//日志文件目录
	//pid.nohup.log
	//pid.access.log
	//pid.error.log
	LogDir string
	//自定义的参数
	Args map[string]interface{}
}

type Rabbitmq

type Rabbitmq struct {
	Uri          string
	Exchange     string
	ExchangeType string
	Queue        string
	BindingKey   string //
	ConsumerTag  string //消费者TAG
}

type Redis

type Redis struct {
	Uri   string //redis://:[password]@[ip]:[port]/[db]
	Queue string
}

type Rpc

type Rpc struct {
	RpcExpired int //远程访问最后期限值 单位秒[默认5秒] 这个值指定了在客户端可以等待服务端多长时间来应答
}

type SSH

type SSH struct {
	Host     string
	Port     int
	User     string
	Password string
}

func (*SSH) GetSSHHost

func (s *SSH) GetSSHHost() string

* host:port

Jump to

Keyboard shortcuts

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