collector

package
v0.0.0-...-37dee4f Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector is a streaming telemetry data collector

func New

func New(cfg *config.Config) *Collector

New initializes a new Collector

func (*Collector) AddTarget

func (c *Collector) AddTarget(tconf *config.Target, stringValueMapping map[string]map[string]int, reconnect bool) *Target

AddTarget adds a target to the collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

Collect collects data from the collector and send it to prometheus

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

Describe is required by prometheus interface

func (*Collector) Dump

func (c *Collector) Dump() []string

Dump dumps the collectors internal state

func (*Collector) Stop

func (c *Collector) Stop()

Stop stops the collector

type Target

type Target struct {
	// contains filtered or unexported fields
}

Target represents a streaming telemetry exporting network device

func (*Target) Serve

func (t *Target) Serve(con *grpc.ClientConn)

Serve is the main handling routine for a target

Jump to

Keyboard shortcuts

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