Documentation ¶
Index ¶
Constants ¶
View Source
const (
// MinSampleCount is the minimum number of samples needed by the detection algorithm to start estimating anomalies.
MinSampleCount = 1 << 5
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scraper ¶
type Scraper struct {
// contains filtered or unexported fields
}
Scraper holds the configuration for a scraper.
func (*Scraper) LenSamples ¶
LenSamples is a wrapper over sampleChan.Len.
func (*Scraper) ReadSample ¶
func (s *Scraper) ReadSample() TimestampedFloat64
ReadSample is a wrapper over sampleChan.Read.
func (*Scraper) Scrape ¶
Scrape scrapes the endpoint and sends the metric value to the sample channel.
func (*Scraper) WriteSample ¶
WriteSample is a wrapper over sampleChan.Write.
type TimestampedFloat64 ¶
type TimestampedFloat64 struct {
// contains filtered or unexported fields
}
TimestampedFloat64 holds a timestamped float64 value.
func (*TimestampedFloat64) String ¶
func (tsf *TimestampedFloat64) String() string
String returns a pretty-printed string representation of the TimestampedFloat64.
func (*TimestampedFloat64) Timestamp ¶
func (tsf *TimestampedFloat64) Timestamp() time.Time
Timestamp returns the timestamp of the sample.
func (*TimestampedFloat64) Value ¶
func (tsf *TimestampedFloat64) Value() float64
Value returns the value of the sample.
Click to show internal directories.
Click to hide internal directories.