exporter

package
v0.0.0-...-c59b76b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTag

func FormatTag(text string) string

FormatTag replaces special characters with underscores for prometheus metric naming convention: https://prometheus.io/docs/instrumenting/writing_exporters/#naming

Types

type Exporter

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

Exporter is a struct that contains an instance of AWS clients and job configuration

func New

func New(log *logrus.Logger, j *config.Job, m *metrics.Set) *Exporter

New returns a new instance of Exporter for a job config

func (*Exporter) AddClient

func (ex *Exporter) AddClient(client MetricsCollector)

AddClient adds a MetricsCollector client to the Exporter.

func (*Exporter) Clients

func (ex *Exporter) Clients() []MetricsCollector

Clients returns the Exporter's clients.

func (*Exporter) Job

func (ex *Exporter) Job() *config.Job

Job returns the Exporter's job.

func (*Exporter) Logger

func (ex *Exporter) Logger() *logrus.Logger

Logger returns the exporter's logging instance.

func (*Exporter) Session

func (ex *Exporter) Session() *session.Session

Session returns the Exporter's AWS Session.

type MetricsCollector

type MetricsCollector interface {
	Collect() error
}

MetricsCollector is an interface for a set of methods to interact with AWS

Jump to

Keyboard shortcuts

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