Documentation ¶
Index ¶
- Constants
- func Alerts() *chan Monitor
- func Avg(ps PointSeries) float64
- func Gather()
- func LabelsEqual(a, b []string) bool
- func NewAlertManager() *alertManager
- func NewMemSeries(id uint64, lset Labels, chunkRange int64) *memSeries
- func Register(cs ...Collector)
- func RegisterMonitor(ms ...Monitor)
- func SetCollectInterval(i int)
- func StartAlertManager()
- type Collector
- type Counter
- type CounterVec
- type Desc
- type Iterator
- type Label
- type LabelPair
- type Labels
- type Matrix
- type Metric
- type Monitor
- type PointSeries
- type Registry
- type Sample
- type Series
Constants ¶
View Source
const SeparatorByte byte = 255
fo handling collsion like {"foo", "bar"} and {"foob", "ar"}
Variables ¶
This section is empty.
Functions ¶
func Avg ¶
func Avg(ps PointSeries) float64
func LabelsEqual ¶
func NewAlertManager ¶
func NewAlertManager() *alertManager
func NewMemSeries ¶
func RegisterMonitor ¶
func RegisterMonitor(ms ...Monitor)
func SetCollectInterval ¶
func SetCollectInterval(i int)
func StartAlertManager ¶
func StartAlertManager()
Types ¶
type CounterVec ¶
type CounterVec struct {
// contains filtered or unexported fields
}
func NewCounterVec ¶
func NewCounterVec(name string, help string, labelNames []string) *CounterVec
func (*CounterVec) WithLabelValues ¶
func (v *CounterVec) WithLabelValues(lvs ...string) Counter
type Iterator ¶
type Iterator interface { // Next advances the iterator by one. Next() bool // Seek advances the iterator forward to the first sample with the timestamp equal or greater than t. // If current sample found by previous `Next` or `Seek` operation already has this property, Seek has no effect. // Seek returns true, if such sample exists, false otherwise. // Iterator is exhausted when the Seek returns false. Seek(t int64) bool // At returns the current timestamp/value pair. // Before the iterator has advanced At behaviour is unspecified. At() (int64, float64) // Err returns the current error. It should be used only after iterator is // exhausted, that is `Next` or `Seek` returns false. Err() error }
type PointSeries ¶
type PointSeries struct { Metric Labels Points []float64 // contains filtered or unexported fields }
Series is a stream of data points belonging to a metric.
func NewPointSeries ¶
func NewPointSeries(labels Labels, evalInterval int64) *PointSeries
func Rate ¶
func Rate(ps PointSeries) PointSeries
func Sum ¶
func Sum(m Matrix) PointSeries
func (*PointSeries) EvalInterval ¶
func (ps *PointSeries) EvalInterval() int64
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type Series ¶
type Series interface { // Labels returns the complete set of labels identifying the series. Labels() Labels // Iterator returns a new iterator of the data of the series. Iterator() Iterator // Appender returns an appender to append samples to the series. //Appender() (Appender, error) // NumSamples returns the number of samples in the series. NumSamples() int }
Click to show internal directories.
Click to hide internal directories.