Documentation
¶
Index ¶
Constants ¶
View Source
const ( BooleanType vType = "boolean" StringType vType = "string" IntType vType = "int" )
View Source
const (
ProcessorDefaultType string = "processor_default"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregatedConfig ¶
type AggregatedConfig struct {
KindMap map[string][]KindConfig
}
type AggregatedKindConfig ¶
type Aggregator ¶
type Aggregator interface {
Aggregate(data *model.DataBlock, selectors *LabelSelectors)
Dump() []*model.DataBlock
}
type AggregatorKind ¶
type AggregatorKind int
const ( SumKind AggregatorKind = iota MaxKind AvgKind LastKind CountKind HistogramKind )
func GetAggregatorKind ¶
func GetAggregatorKind(kind string) AggregatorKind
type Config ¶
type Config struct {
TickerInterval int `mapstructure:"ticker_interval"`
SessionInfos []Session `mapstructure:"sessioninfo"`
AggregateKindMap map[string][]AggregatedKindConfig `mapstructure:"aggregate_kind_map"`
}
type DefaultAggregator ¶
type DefaultAggregator struct {
// contains filtered or unexported fields
}
func NewDefaultAggregator ¶
func NewDefaultAggregator(config *AggregatedConfig) *DefaultAggregator
func (*DefaultAggregator) Aggregate ¶
func (d *DefaultAggregator) Aggregate(data *model.DataBlock, selectors *LabelSelectors)
Aggregate 往aggregatorMap中写聚合数据, 在Consume接口中调用Aggregate聚合
func (*DefaultAggregator) Dump ¶
func (d *DefaultAggregator) Dump() []*model.DataBlock
type DefaultProcessor ¶
type DefaultProcessor struct {
// contains filtered or unexported fields
}
type KindConfig ¶
type KindConfig struct {
OutputName string
Kind AggregatorKind
// Only HistogramKind has this value
ExplicitBoundaries []int64
}
type LabelKeys ¶
type LabelKeys struct {
// contains filtered or unexported fields
}
func GetLabelsKeys ¶
func GetLabelsKeys(attributeMap *model.AttributeMap) *LabelKeys
func NewLabelKeys ¶
func (*LabelKeys) GetLabels ¶
func (k *LabelKeys) GetLabels() *model.AttributeMap
type LabelSelector ¶
type LabelSelector struct {
Name string
VType vType
}
type LabelSelectors ¶
type LabelSelectors struct {
// contains filtered or unexported fields
}
func NewLabelSelectors ¶
func NewLabelSelectors(selectors ...LabelSelector) *LabelSelectors
func (*LabelSelectors) AppendSelectors ¶
func (s *LabelSelectors) AppendSelectors(selectors ...LabelSelector)
func (*LabelSelectors) GetLabelKeys ¶
func (s *LabelSelectors) GetLabelKeys(labels *model.AttributeMap) *LabelKeys
Click to show internal directories.
Click to hide internal directories.