Documentation ¶
Index ¶
- type Centroid
- type Distribution
- func (d *Distribution) AddTags(tags map[string]string)
- func (d *Distribution) Clone() *Distribution
- func (d *Distribution) Equals(b *Distribution) bool
- func (d *Distribution) FilterTags(pred func(string) bool)
- func (d *Distribution) Key() DistributionHash
- func (d *Distribution) Name() string
- func (d *Distribution) OverrideTag(name, value string)
- func (d *Distribution) Points() int
- func (d *Distribution) Rate(prev *Distribution) *Distribution
- func (d *Distribution) Send(to Sender) error
- func (d *Distribution) SetSource(source string)
- func (d *Distribution) Tags() map[string]string
- func (d *Distribution) ToFrequency() *Distribution
- type DistributionHash
- type Incrementer
- type LabelPair
- type Metric
- type Point
- func (m *Point) AddTag(name, value string)
- func (m *Point) AddTags(tags map[string]string)
- func (m *Point) FilterTags(pred func(string) bool)
- func (m *Point) Name() string
- func (m *Point) OverrideTag(name, value string)
- func (m *Point) Points() int
- func (m *Point) Send(to Sender) error
- func (m *Point) SetLabelPairs(pairs []LabelPair)
- func (m *Point) SetSource(source string)
- func (m *Point) SetTags(tags map[string]string)
- func (m *Point) Tags() map[string]string
- type Sender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Distribution ¶
type Distribution struct { Cumulative bool Source string Centroids []Centroid Timestamp time.Time // contains filtered or unexported fields }
func NewCumulativeDistribution ¶
func NewCumulativeDistribution(name string, source string, tags map[string]string, centroids []Centroid, timestamp time.Time) *Distribution
NewCumulativeDistribution encodes prometheus style distribution.
func NewFrequencyDistribution ¶
func NewFrequencyDistribution(name string, source string, tags map[string]string, centroids []Centroid, timestamp time.Time) *Distribution
NewFrequencyDistribution encodes a WF style distribution.
func (*Distribution) AddTags ¶
func (d *Distribution) AddTags(tags map[string]string)
func (*Distribution) Clone ¶
func (d *Distribution) Clone() *Distribution
func (*Distribution) Equals ¶
func (d *Distribution) Equals(b *Distribution) bool
func (*Distribution) FilterTags ¶
func (d *Distribution) FilterTags(pred func(string) bool)
func (*Distribution) Key ¶
func (d *Distribution) Key() DistributionHash
func (*Distribution) Name ¶
func (d *Distribution) Name() string
func (*Distribution) OverrideTag ¶
func (d *Distribution) OverrideTag(name, value string)
func (*Distribution) Points ¶
func (d *Distribution) Points() int
func (*Distribution) Rate ¶
func (d *Distribution) Rate(prev *Distribution) *Distribution
func (*Distribution) Send ¶
func (d *Distribution) Send(to Sender) error
func (*Distribution) SetSource ¶
func (d *Distribution) SetSource(source string)
func (*Distribution) Tags ¶
func (d *Distribution) Tags() map[string]string
func (*Distribution) ToFrequency ¶
func (d *Distribution) ToFrequency() *Distribution
type DistributionHash ¶
type DistributionHash [32]byte
type Incrementer ¶
type Incrementer interface {
Inc(int642 int64)
}
type Metric ¶
type Metric interface { Name() string Tags() map[string]string FilterTags(pred func(string) bool) OverrideTag(name, value string) AddTags(tags map[string]string) SetSource(source string) Send(to Sender) error Points() int }
func Filter ¶
func Filter(filter filter.Filter, filtered Incrementer, point Metric) Metric
Filter returns nil when it does not match the supplied filter.Filter. Filter increments the Incrementor when filtering. Filter filters the tags on a matched point.
func FilterAppend ¶
func FilterAppend(filter filter.Filter, filtered Incrementer, points []Metric, point Metric) []Metric
FilterAppend appends the point to points when Filter does not return nil
type Point ¶
type Point struct { Metric string Value float64 Timestamp int64 Source string // contains filtered or unexported fields }
Point is a single point in Wavefront metric format.
func (*Point) FilterTags ¶
func (*Point) OverrideTag ¶
OverrideTag sets a tag regardless of whether it already exists
func (*Point) SetLabelPairs ¶
Click to show internal directories.
Click to hide internal directories.