Documentation
¶
Index ¶
Constants ¶
View Source
const ( VERSION = "0.1.0" GAUGE = "GAUGE" COUNTER = "COUNTER" DERIVE = "DERIVE" LOG = "LOG" DEFAULT_STEP = 60 )
View Source
const (
COMMIT = "1b674c1"
)
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"`
IllegalChar []string `json:"illegalchar"`
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"`
Kafka *KafkaConfig `json:"kafka"` //added by vincent.zhang for sending to kafka
Redis *RedisConfig `json:"redis"`
}
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"`
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 JudgeConfig ¶
type JudgeConfig 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"`
Replicas int `json:"replicas"`
Cluster map[string]string `json:"cluster"`
ClusterList map[string]*ClusterNode `json:"clusterList"`
}
type KafkaConfig ¶
type KafkaConfig struct {
Enabled bool `json:"enabled"`
LogEnabled bool `json:"logEnabled"`
Batch int `json:"batch"`
ConnTimeout int `json:"connTimeout"`
CallTimeout int `json:"callTimeout"`
MaxConcurrent int `json:"maxConcurrent"`
MaxRetry int `json:"retry"`
Address []string `json:"address"`
Topic string `json:"topic"`
LogTopic string `json:"logTopic"`
Filter map[string]map[string]string `json:"filter"` // added by qimin.xu for filter tag
}
added by vincent.zhang for sending to kafka
type RedisConfig ¶
type SocketConfig ¶
Click to show internal directories.
Click to hide internal directories.