config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLUSTER_LIVETIME  = 3600
	CLUSTER_LIVEDELAY = 120
	CLUSTER_LIVECHEAK = 360

	TCP = "TCP"

	WS = "WS"

	CLUSTER = "CLUSTER"

	HTTP = "HTTP"

	EX = "EX"

	LOG = "LOG"

	OPEN = "open"

	PATH = "path"

	START = "start"

	PORT = "port"

	SSL = "ssl"

	KEYNAME = "keyname"

	CRTNAME = "crtname"

	DEADLINE = "deadline"

	LIVETIME = "livetime"

	IPHASH = "iphash"

	COMPATIBLE = "compatible"

	MODEL = "model"

	LOCAL_PORT = "local.port"

	REMOTE_HOST = "remote.host"

	REMOTE_PORT = "remote.port"

	CONSOLE = "console"

	CLUSTERCLIENT = "CLUSTERCLIENT"

	TCPCLIENT = "TCPCLIENT"

	HTTPCLIENT = "HTTPCLIENT"

	CLUSTER_CONN_SERVER = "CLUSTER_CONN_SERVER"
)

Variables

View Source
var CLUSTER_LOCAL_PORT int = 6574
View Source
var CLUSTER_REMOTE_HOST string = ""
View Source
var CLUSTER_REMOTE_PORT int = 0
View Source
var CLUSTER_START = false

* 集群配置

View Source
var CRT_NAME string = "impush.crt"
View Source
var EX_C_BLANK_NUM = 256
View Source
var EX_DEADLINE = 10
View Source
var EX_LIVETIME = 60
View Source
var EX_MODEL = "C"
View Source
var EX_START = false

* HTTP轮序消息推送配置

View Source
var HTTP_PORT int = 5222
View Source
var HTTP_SSL bool = false
View Source
var HTTP_START bool = true
View Source
var KEY_NAME string = "impush.key"
View Source
var LOG_CONSOLE = false
View Source
var LOG_OPEN = false

* 日志配置

View Source
var LOG_PATH = "log"
View Source
var TCP_PORT int = 4646
View Source
var TCP_START bool = false

* TCP的配置

View Source
var WS_START = false

Functions

func Init

func Init()

Types

type Configure

type Configure struct {
	Path string
	Cg   *config.Config
	// contains filtered or unexported fields
}

func (*Configure) GetValue

func (cfg *Configure) GetValue(key string) string

func (*Configure) PutValue

func (cfg *Configure) PutValue(key string, value string)

Jump to

Keyboard shortcuts

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