aggregator

package
v0.48.0-rc.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreTagsSubsetOfOtherTags

func AreTagsSubsetOfOtherTags(tags, otherTags []string) bool

func FilterByTags

func FilterByTags[P PayloadItem](payloads []P, tags []string) []P

Types

type Aggregator

type Aggregator[P PayloadItem] struct {
	// contains filtered or unexported fields
}

func (*Aggregator[P]) ContainsPayloadName

func (agg *Aggregator[P]) ContainsPayloadName(name string) bool

func (*Aggregator[P]) ContainsPayloadNameAndTags

func (agg *Aggregator[P]) ContainsPayloadNameAndTags(name string, tags []string) bool

func (*Aggregator[P]) GetNames

func (agg *Aggregator[P]) GetNames() []string

func (*Aggregator[P]) GetPayloadsByName

func (agg *Aggregator[P]) GetPayloadsByName(name string) []P

func (*Aggregator[P]) Reset

func (agg *Aggregator[P]) Reset()

func (*Aggregator[P]) UnmarshallPayloads

func (agg *Aggregator[P]) UnmarshallPayloads(payloads []api.Payload) error

type CheckRun

type CheckRun struct {
	Check     string   `json:"check"`
	HostName  string   `json:"host_name"`
	Timestamp int      `json:"timestamp"`
	Status    int      `json:"status"`
	Message   string   `json:"message"`
	Tags      []string `json:"tags"`
}

func ParseCheckRunPayload

func ParseCheckRunPayload(payload api.Payload) (checks []*CheckRun, err error)

func (*CheckRun) GetTags

func (cr *CheckRun) GetTags() []string

type CheckRunAggregator

type CheckRunAggregator struct {
	Aggregator[*CheckRun]
}

func NewCheckRunAggregator

func NewCheckRunAggregator() CheckRunAggregator

type Log

type Log struct {
	Message   string   `json:"message"`
	Status    string   `json:"status"`
	Timestamp int      `json:"timestamp"`
	HostName  string   `json:"hostname"`
	Service   string   `json:"service"`
	Source    string   `json:"source"`
	Tags      []string `json:"tags"`
}

func ParseLogPayload

func ParseLogPayload(payload api.Payload) (logs []*Log, err error)

func (*Log) GetTags

func (l *Log) GetTags() []string

type LogAggregator

type LogAggregator struct {
	Aggregator[*Log]
}

func NewLogAggregator

func NewLogAggregator() LogAggregator

type MetricAggregator

type MetricAggregator struct {
	Aggregator[*MetricSeries]
}

func NewMetricAggregator

func NewMetricAggregator() MetricAggregator

type MetricSeries

type MetricSeries struct {
	// embed proto Metric Series struct
	metricspb.MetricPayload_MetricSeries
}

func ParseMetricSeries

func ParseMetricSeries(payload api.Payload) (metrics []*MetricSeries, err error)

func (*MetricSeries) GetTags

func (mp *MetricSeries) GetTags() []string

type PayloadItem

type PayloadItem interface {
	GetTags() []string
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL