printer

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Config

type Config interface {
	Filter() *regexp.Regexp
	AggregateIgnoreLabels() provider.StringSet
	Format() OutputFormat
	Writer() io.Writer
	Metrics() []string
	NoHeader() bool
}

type FetcherConfig

type FetcherConfig interface {
	UrlMetricsFetcher() provider.UrlMetricsFetcher
	File() string
	Interval() time.Duration
}

type MetricEntryFetcher

type MetricEntryFetcher interface {
	Entries() <-chan string
	Close() error
}

func NewFetcher

func NewFetcher(conf FetcherConfig) (MetricEntryFetcher, error)

type OutputFormat

type OutputFormat string
const (
	OpenMetricsFormat OutputFormat = "open-metrics"
	CSVFormat         OutputFormat = "csv"
)

type Printer

type Printer interface {
	Print(entry string) error
}

func NewPrinter

func NewPrinter(conf Config) (Printer, error)

Jump to

Keyboard shortcuts

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