g

package
v3.14.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 15

Documentation

Index

Constants

View Source
const (
	VERSION      = "0.0.17"
	GAUGE        = "GAUGE"
	COUNTER      = "COUNTER"
	DERIVE       = "DERIVE"
	DEFAULT_STEP = 60
)
View Source
const (
	COMMIT = "1ee55c3"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func ParseConfig

func ParseConfig(cfg string)

Types

type ClusterNode

type ClusterNode struct {
	Addrs []string `json:"addrs"`
}

CLUSTER NODE

func NewClusterNode

func NewClusterNode(addrs []string) *ClusterNode

type GlobalConfig

type GlobalConfig struct {
	Debug    bool            `json:"debug"`
	MinStep  int             `json:"minStep"` //最小周期,单位sec
	Http     *HttpConfig     `json:"http"`
	Rpc      *RpcConfig      `json:"rpc"`
	Socket   *SocketConfig   `json:"socket"`
	Judge    *JudgeConfig    `json:"judge"`
	Graph    *GraphConfig    `json:"graph"`
	Tsdb     *TsdbConfig     `json:"tsdb"`
	Influxdb *InfluxdbConfig `json:"influxdb"`
	NqmRest  *NqmRestConfig  `json:"nqmRest"`
	Staging  *StagingConfig  `json:"staging"`
}

func Config

func Config() *GlobalConfig

type GraphConfig

type GraphConfig struct {
	Enabled     bool                    `json:"enabled"`
	Batch       int                     `json:"batch"`
	ConnTimeout int                     `json:"connTimeout"`
	CallTimeout int                     `json:"callTimeout"`
	PingMethod  string                  `json:"pingMethod"`
	MaxConns    int                     `json:"maxConns"`
	MaxIdle     int                     `json:"maxIdle"`
	Replicas    int                     `json:"replicas"`
	Cluster     map[string]string       `json:"cluster"`
	ClusterList map[string]*ClusterNode `json:"clusterList"`
}

type HttpConfig

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

type InfluxdbConfig

type InfluxdbConfig struct {
	Enabled     bool   `json:"enabled"`
	Batch       int    `json:"batch"`
	ConnTimeout int    `json:"connTimeout"`
	CallTimeout int    `json:"callTimeout"`
	MaxConns    int    `json:"maxConns"`
	MaxIdle     int    `json:"maxIdle"`
	Address     string `json:"addr"`
}

type JudgeConfig

type JudgeConfig struct {
	Enabled     bool                    `json:"enabled"`
	Batch       int                     `json:"batch"`
	ConnTimeout int                     `json:"connTimeout"`
	CallTimeout int                     `json:"callTimeout"`
	PingMethod  string                  `json:"pingMethod"`
	MaxConns    int                     `json:"maxConns"`
	MaxIdle     int                     `json:"maxIdle"`
	Replicas    int                     `json:"replicas"`
	Cluster     map[string]string       `json:"cluster"`
	ClusterList map[string]*ClusterNode `json:"clusterList"`
}

type NqmRestConfig

type NqmRestConfig struct {
	Enabled     bool   `json:"enabled"`
	Batch       int    `json:"batch"`
	ConnTimeout int    `json:"connTimeout"`
	CallTimeout int    `json:"callTimeout"`
	MaxConns    int    `json:"maxConns"`
	MaxIdle     int    `json:"maxIdle"`
	Fping       string `json:"fping"`
	Tcpping     string `json:"tcpping"`
	Tcpconn     string `json:"tcpconn"`
}

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 int    `json:"timeout"`
}

type StagingConfig

type StagingConfig struct {
	Enabled     bool     `json:"enabled"`
	Batch       int      `json:"batch"`
	ConnTimeout int      `json:"connTimeout"`
	CallTimeout int      `json:"callTimeout"`
	MaxConns    int      `json:"maxConns"`
	MaxIdle     int      `json:"maxIdle"`
	MaxRetry    int      `json:"retry"`
	Address     string   `json:"address"`
	Filters     []string `json:"filters"`
}

type TsdbConfig

type TsdbConfig struct {
	Enabled     bool   `json:"enabled"`
	Batch       int    `json:"batch"`
	ConnTimeout int    `json:"connTimeout"`
	CallTimeout int    `json:"callTimeout"`
	MaxConns    int    `json:"maxConns"`
	MaxIdle     int    `json:"maxIdle"`
	MaxRetry    int    `json:"retry"`
	Address     string `json:"address"`
}

Jump to

Keyboard shortcuts

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