collector

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator struct {
	CreateOrder   int
	AggregateType types.AggregateType
}

func (*Aggregator) Aggregate

func (a *Aggregator) Aggregate(metrics []TelegrafMetric)

Aggregate 쿠버네티스 노드, 파드 메트릭 처리 및 저장

func (*Aggregator) AggregateMetric

func (a *Aggregator) AggregateMetric(kafkaAdminClient *kafka.AdminClient, kafkaConsumerConn *kafka.Consumer, topic string)

type MetricCollector

type MetricCollector struct {
	KafkaAdminClient  *kafka.AdminClient
	KafkaConsumerConn *kafka.Consumer
	CreateOrder       int
	Aggregator        Aggregator
	Ch                chan string
}

func NewMetricCollector

func NewMetricCollector(aggregateType types.AggregateType, createOrder int) (MetricCollector, error)

func (*MetricCollector) DoCollect

func (mc *MetricCollector) DoCollect(wg *sync.WaitGroup) error

type TelegrafMetric

type TelegrafMetric struct {
	Name      string                 `json:"name"`
	Tags      map[string]string      `json:"tags"`
	Fields    map[string]interface{} `json:"fields"`
	Timestamp int64                  `json:"timestamp"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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