g

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION      = "0.0.11"
	GAUGE        = "GAUGE"
	COUNTER      = "COUNTER"
	DERIVE       = "DERIVE"
	DEFAULT_STEP = 60
	MIN_STEP     = 30
)

Variables

View Source
var (
	RecvDataTrace  = nproc.NewDataTrace("RecvDataTrace", 5)
	RecvDataFilter = nproc.NewDataFilter("RecvDataFilter", 5)
)
View Source
var (
	ConfigFile string
)

Functions

func InitLog

func InitLog(level string) (err error)

func ParseConfig

func ParseConfig(cfg string)

Types

type GlobalConfig

type GlobalConfig struct {
	Debug    bool            `json:"debug"`
	Http     *HttpConfig     `json:"http"`
	Rpc      *RpcConfig      `json:"rpc"`
	Socket   *SocketConfig   `json:"socket"`
	Transfer *TransferConfig `json:"transfer"`
}

func Config

func Config() *GlobalConfig

type HttpConfig

type HttpConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
}

type RpcConfig

type RpcConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
}

type SocketConfig

type SocketConfig struct {
	Enabled bool   `json:"enabled"`
	Listen  string `json:"listen"`
	Timeout int32  `json:"timeout"`
}

type TransferConfig

type TransferConfig struct {
	Enabled     bool              `json:"enabled"`
	Batch       int32             `json:"batch"`
	Retry       int32             `json:"retry"`
	ConnTimeout int32             `json:"connTimeout"`
	CallTimeout int32             `json:"callTimeout"`
	MaxConns    int32             `json:"maxConns"`
	MaxIdle     int32             `json:"maxIdle"`
	Cluster     map[string]string `json:"cluster"`
}

Jump to

Keyboard shortcuts

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