Documentation ¶
Index ¶
- func AreTagsSubsetOfOtherTags(tags, otherTags []string) bool
- func FilterByTags[P PayloadItem](payloads []P, tags []string) []P
- type Aggregator
- func (agg *Aggregator[P]) ContainsPayloadName(name string) bool
- func (agg *Aggregator[P]) ContainsPayloadNameAndTags(name string, tags []string) bool
- func (agg *Aggregator[P]) GetNames() []string
- func (agg *Aggregator[P]) GetPayloadsByName(name string) []P
- func (agg *Aggregator[P]) Reset()
- func (agg *Aggregator[P]) UnmarshallPayloads(payloads []api.Payload) error
- type CheckRun
- type CheckRunAggregator
- type Connections
- type ConnectionsAggregator
- type Log
- type LogAggregator
- type MetricAggregator
- type MetricSeries
- type PayloadItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreTagsSubsetOfOtherTags ¶
AreTagsSubsetOfOtherTags return true is all tags are in otherTags
func FilterByTags ¶
func FilterByTags[P PayloadItem](payloads []P, tags []string) []P
FilterByTags return the payloads that match all the tags
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
ContainsPayloadName return true if name match one of the payloads
func (*Aggregator[P]) ContainsPayloadNameAndTags ¶
func (agg *Aggregator[P]) ContainsPayloadNameAndTags(name string, tags []string) bool
ContainsPayloadNameAndTags return true if the payload name exist and on of the payloads contains all the tags
func (*Aggregator[P]) GetNames ¶
func (agg *Aggregator[P]) GetNames() []string
GetNames return the names of the payloads
func (*Aggregator[P]) GetPayloadsByName ¶
func (agg *Aggregator[P]) GetPayloadsByName(name string) []P
GetPayloadsByName return the payloads for the resource name
func (*Aggregator[P]) UnmarshallPayloads ¶
func (agg *Aggregator[P]) UnmarshallPayloads(payloads []api.Payload) error
UnmarshallPayloads aggregate the payloads
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"` // contains filtered or unexported fields }
func ParseCheckRunPayload ¶
ParseCheckRunPayload return the parsed checkRun from payload
func (*CheckRun) GetCollectedTime ¶ added in v0.49.0
GetCollectedTime return the time when the payload has been collected by the fakeintake server
type CheckRunAggregator ¶
type CheckRunAggregator struct { Aggregator[*CheckRun] }
func NewCheckRunAggregator ¶
func NewCheckRunAggregator() CheckRunAggregator
type Connections ¶ added in v0.49.0
type Connections struct { agentmodel.CollectorConnections // contains filtered or unexported fields }
Connections type contain all payload from /api/v1/connections
func ParseConnections ¶ added in v0.49.0
func ParseConnections(payload api.Payload) (conns []*Connections, err error)
ParseConnections return the Connections from payload
func (*Connections) GetCollectedTime ¶ added in v0.49.0
func (c *Connections) GetCollectedTime() time.Time
GetCollectedTime return the time when the payload has been collected by the fakeintake server
func (*Connections) GetTags ¶ added in v0.49.0
func (c *Connections) GetTags() []string
GetTags return tags connection
type ConnectionsAggregator ¶ added in v0.49.0
type ConnectionsAggregator struct { Aggregator[*Connections] }
ConnectionsAggregator aggregate connections
func NewConnectionsAggregator ¶ added in v0.49.0
func NewConnectionsAggregator() ConnectionsAggregator
NewConnectionsAggregator create a new aggregator
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"` // contains filtered or unexported fields }
func ParseLogPayload ¶
ParseLogPayload return the parsed logs from payload
func (*Log) GetCollectedTime ¶ added in v0.49.0
GetCollectedTime return the time when the payload has been collected by the fakeintake server
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 // contains filtered or unexported fields }
func ParseMetricSeries ¶
func ParseMetricSeries(payload api.Payload) (metrics []*MetricSeries, err error)
ParseMetricSeries return the parsed metrics from payload
func (*MetricSeries) GetCollectedTime ¶ added in v0.49.0
func (mp *MetricSeries) GetCollectedTime() time.Time
GetCollectedTime return the time when the payload has been collected by the fakeintake server
func (*MetricSeries) GetTags ¶
func (mp *MetricSeries) GetTags() []string
GetTags return the tags from a payload