Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfluxDBPublisher ¶
type InfluxDBPublisher struct {
// contains filtered or unexported fields
}
InfluxDBPublisher ships metrics to influxdb
func NewInfluxDBPublisher ¶
func NewInfluxDBPublisher(host, token, org, bucket string) *InfluxDBPublisher
NewInfluxDBPublisher creates a new influx db publisher
func (*InfluxDBPublisher) Publish ¶
func (p *InfluxDBPublisher) Publish(name string, metric int64)
Publish publishes a given metric to influxdb
type Metric ¶
type Metric struct { Type MetricType Name string Interval time.Duration Samples int Value *int64 // contains filtered or unexported fields }
Metric
type MetricType ¶
type MetricType int
MetricType denotes the type of metric to track
const ( Counter MetricType = iota MovingAverage )
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor monitors given values at different timeframes
func (*Monitor) AddPubisher ¶
AddPublisher adds a target to publish metrics to
type RingBuffer ¶
type RingBuffer struct {
// contains filtered or unexported fields
}
RingBuffer that
func NewRingBuffer ¶
func NewRingBuffer(samples int) *RingBuffer
NewRingBuffer creates a new ring buffer of int64's
func (*RingBuffer) Dequeue ¶
func (b *RingBuffer) Dequeue() int64
Dequeue dequeues a value off the buffer
func (*RingBuffer) Iterate ¶
func (b *RingBuffer) Iterate(fn func(v int64))
Iterate iterates through the ring buffer
Click to show internal directories.
Click to hide internal directories.