Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckInArray ¶
func CheckSubArray ¶
func NewWindow ¶
func NewWindow() map[string]MetricHolder
Types ¶
type MetricCache ¶
type MetricCache struct {
Windows map[int64]map[string]MetricHolder
}
func NewMetricCache ¶
func NewMetricCache() MetricCache
type MetricHolder ¶
type MetricHolder interface {
InitValue(models.MetricEnvelope)
UpdateValue(models.MetricEnvelope)
GetMetric() models.MetricEnvelope
SetTimestamp(float64)
// contains filtered or unexported methods
}
func CreateMetricType ¶
func CreateMetricType(aggSpec models.AggregationSpecification, metricEnv models.MetricEnvelope) MetricHolder
type Rule ¶
type Rule struct {
models.AggregationSpecification
MetricCache
}
func NewAggregationRule ¶
func NewAggregationRule(aggSpec models.AggregationSpecification) (Rule, error)
func (*Rule) AddMetric ¶
func (a *Rule) AddMetric(metricEnvelope models.MetricEnvelope, windowSize time.Duration)
func (*Rule) GetMetrics ¶
func (a *Rule) GetMetrics(eventTime int64) []models.MetricEnvelope
func (*Rule) MatchesMetric ¶
func (a *Rule) MatchesMetric(newMetric models.MetricEnvelope) bool
Click to show internal directories.
Click to hide internal directories.