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)
func SetConfig ¶
func SetConfig(newConfig *GlobalConfig)
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"` 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 InfluxdbConfig ¶
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 SocketConfig ¶
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"` }
Click to show internal directories.
Click to hide internal directories.