collector

package
v0.0.0-...-b524ce4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetAndParse retrieves XML data from the API and unmarshals it
	GetAndParse(ctx context.Context, path string, v interface{}) error
}

type CollectorContext

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

func NewContext

func NewContext(tracer trace.Tracer, client *api.Client) *CollectorContext

func (*CollectorContext) Client

func (c *CollectorContext) Client() Client

Client returns the client to query the API

func (*CollectorContext) Clone

func (c *CollectorContext) Clone() *CollectorContext

func (*CollectorContext) HandleError

func (c *CollectorContext) HandleError(err error, span trace.Span)

HandleError handles an error

func (*CollectorContext) RecordMetrics

func (c *CollectorContext) RecordMetrics(metrics ...prometheus.Metric)

RecordMetrics returns the collected metrics to the collector

func (*CollectorContext) SetMetricsCh

func (c *CollectorContext) SetMetricsCh(ch chan<- prometheus.Metric)

SetMetricsCh sets the metrics channel observed by the collector

func (*CollectorContext) Tracer

func (c *CollectorContext) Tracer() trace.Tracer

Tracer returns the configured tracer

Jump to

Keyboard shortcuts

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