Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SeedsToFile ¶
SeedsToFile write the seeds to file
Types ¶
type Cluster ¶
type Cluster struct { Gossip bool `yaml:"gossip"` // if run as gossip cluster mode Group string `yaml:"group"` // cluster name Port uint16 `yaml:"port"` // gossip binding port, random if not set }
Cluster specify the arguments to run cluster
type Config ¶
type Config struct { Slave bool `yaml:"slave"` // run as slave in the cluster Port uint16 `yaml:"serverport"` // server port Interval uint16 `yaml:"interval"` // report interval SlowThresholdMs int64 `yaml:"slowthresholdms"` // threshold to record slow query Cluster Cluster `yaml:"cluster"` // cluster config Probe Probe `yaml:"probe"` // probe conifg, only slave will start a probe Pusher Pusher `yaml:"pusher"` // pusher config Watcher ConnectionWatcher `yaml:"watcher"` // connection watcher config Websocket Websocket `yaml:"websocket"` // websocket config Role string `yaml:"-"` // role of this node Path string `yaml:"-"` // config file path }
Config holds the parameters starting probe, server and cluster
type ConnectionWatcher ¶
ConnectionWatcher is the config of util.ConnectionWatcher
type Probe ¶
type Probe struct { Device string `yaml:"device"` // local devices probe monitor, splited by ',' Port uint16 `yaml:"port"` // port for bpf filter SnapLen int32 `yaml:"snappylength"` // snappy buffer length Workers int `yaml:"workers"` // worker number }
Probe specify the arguments to initialize pcap
type Pusher ¶
type Pusher struct { Servers string `yaml:"servers"` // server list splited by ',' Path string `yaml:"path"` // websocket path Preconnect bool `yaml:"preconnect"` // preconnect to all servers }
Pusher specify the arguments to create static receiver pool
type Seeds ¶
type Seeds struct { Epic uint64 `yaml:"epic"` Name string `yaml:"name"` Addrs []string `yaml:"seeds"` Role string `yaml:"role"` }
Seeds holds the basic cluster infomation
func SeedsFromFile ¶
SeedsFromFile read seed from file
type Websocket ¶
type Websocket struct { ConnectTimeoutMs int `yaml:"connecttimeoutms"` WriteTimeoutMs int `yaml:"writetimeoutms"` PingTimeoutS int `yaml:"pingtimeouts"` ReconnectPeriodS int `yaml:"reconnectperiods"` MaxMessageSize int64 `yaml:"maxmessagesize"` }
Websocket is the config of websocket client and server
Click to show internal directories.
Click to hide internal directories.