Documentation
¶
Index ¶
- Constants
- Variables
- func Send(items []*cmodel.MetricValue)
- func Start()
- type Backend
- type BackendCommon
- type BackendConfig
- type BackendStats
- type InfluxdbBackend
- type InfluxdbClient
- type RiemannBackend
- type RiemannClient
- type TransferBackend
- type TransferClient
- type TsdbBackend
- type TsdbClient
- type TsdbItem
Constants ¶
View Source
const ( DefaultSendQueueMaxSize = 10240 DefaultSendTaskSleepInterval = time.Millisecond * 50 //默认睡眠间隔为50ms )
Variables ¶
View Source
var BackendConstructors = []func(cfg *BackendConfig) Backend{
newRiemannBackend,
newInfluxdbBackend,
newTsdbBackend,
newTransferBackend,
}
View Source
var Backends = make([]Backend, 0, 5)
Functions ¶
func Send ¶
func Send(items []*cmodel.MetricValue)
Types ¶
type Backend ¶
type Backend interface { GetConfig() *BackendConfig Start() error Send(items []*cmodel.MetricValue) GetStats() *BackendStats }
type BackendCommon ¶
type BackendCommon struct {
// contains filtered or unexported fields
}
func (*BackendCommon) GetConfig ¶
func (this *BackendCommon) GetConfig() *BackendConfig
func (*BackendCommon) GetStats ¶
func (this *BackendCommon) GetStats() *BackendStats
type BackendConfig ¶
type BackendStats ¶
type BackendStats struct { Send *nproc.SCounterQps Drop *nproc.SCounterQps Fail *nproc.SCounterQps QueueLength *nproc.SCounterBase ConnPoolStats []*cpool.ConnPoolStats }
type InfluxdbBackend ¶
type InfluxdbBackend struct {
BackendCommon
}
func (*InfluxdbBackend) Send ¶
func (this *InfluxdbBackend) Send(items []*cmodel.MetricValue)
Push data to 3rd-party database
func (*InfluxdbBackend) Start ¶
func (this *InfluxdbBackend) Start() error
type InfluxdbClient ¶
type InfluxdbClient struct {
// contains filtered or unexported fields
}
func (InfluxdbClient) Call ¶
func (this InfluxdbClient) Call(arg interface{}) (interface{}, error)
func (InfluxdbClient) Close ¶
func (this InfluxdbClient) Close() error
func (InfluxdbClient) Closed ¶
func (this InfluxdbClient) Closed() bool
func (InfluxdbClient) Name ¶
func (this InfluxdbClient) Name() string
type RiemannBackend ¶
type RiemannBackend struct {
BackendCommon
}
func (*RiemannBackend) Send ¶
func (this *RiemannBackend) Send(items []*cmodel.MetricValue)
将原始数据入到riemann发送缓存队列
func (*RiemannBackend) Start ¶
func (this *RiemannBackend) Start() error
type RiemannClient ¶
type RiemannClient struct {
// contains filtered or unexported fields
}
func (RiemannClient) Call ¶
func (this RiemannClient) Call(items interface{}) (interface{}, error)
func (RiemannClient) Close ¶
func (this RiemannClient) Close() error
func (RiemannClient) Closed ¶
func (this RiemannClient) Closed() bool
func (RiemannClient) Name ¶
func (this RiemannClient) Name() string
type TransferBackend ¶
type TransferBackend struct { BackendCommon // contains filtered or unexported fields }
func (*TransferBackend) GetStats ¶
func (this *TransferBackend) GetStats() *BackendStats
func (*TransferBackend) Send ¶
func (this *TransferBackend) Send(items []*cmodel.MetricValue)
将原始数据入到riemann发送缓存队列
func (*TransferBackend) Start ¶
func (this *TransferBackend) Start() error
type TransferClient ¶
type TransferClient struct {
// contains filtered or unexported fields
}
func (*TransferClient) Call ¶
func (this *TransferClient) Call(metrics interface{}) (interface{}, error)
func (*TransferClient) Close ¶
func (this *TransferClient) Close() error
func (*TransferClient) Closed ¶
func (this *TransferClient) Closed() bool
func (*TransferClient) Name ¶
func (this *TransferClient) Name() string
type TsdbBackend ¶
type TsdbBackend struct {
BackendCommon
}
func (*TsdbBackend) Send ¶
func (this *TsdbBackend) Send(items []*cmodel.MetricValue)
将原始数据入到tsdb发送缓存队列
func (*TsdbBackend) Start ¶
func (this *TsdbBackend) Start() error
type TsdbClient ¶
type TsdbClient struct {
// contains filtered or unexported fields
}
func (TsdbClient) Call ¶
func (this TsdbClient) Call(items interface{}) (interface{}, error)
func (TsdbClient) Close ¶
func (this TsdbClient) Close() error
func (TsdbClient) Closed ¶
func (this TsdbClient) Closed() bool
func (TsdbClient) Name ¶
func (this TsdbClient) Name() string
Click to show internal directories.
Click to hide internal directories.