prometheus

package
v0.0.0-...-1d907cd Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() metrics.ProviderFactory

Returns a new prometheus provider factory

func NewPointBuilder

func NewPointBuilder(src *prometheusMetricsSource, filtered gometrics.Counter) *pointBuilder

func NewPrometheusMetricsSource

func NewPrometheusMetricsSource(metricsURL, prefix, source, discovered string, tags map[string]string, filters filter.Filter, convertHistograms bool, httpCfg httputil.ClientConfig) (metrics.Source, error)

func NewPrometheusProvider

func NewPrometheusProvider(cfg configuration.PrometheusSourceConfig, lookupInstances LookupInstances) (metrics.SourceProvider, error)

Types

type HTTPError

type HTTPError struct {
	MetricsURL string
	Status     string
	StatusCode int
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

type Instance

type Instance struct {
	Host string
	Tags map[string]string
}

func InstanceFromHost

func InstanceFromHost(instance string) ([]Instance, error)

type LookaheadReader

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

func NewLookaheadReader

func NewLookaheadReader(reader io.Reader) *LookaheadReader

func (*LookaheadReader) Done

func (laReader *LookaheadReader) Done() bool

func (*LookaheadReader) Peek

func (laReader *LookaheadReader) Peek() []byte

func (*LookaheadReader) Read

func (laReader *LookaheadReader) Read() []byte

type LookupInstances

type LookupInstances func(host string) ([]Instance, error)

func InstancesFromEndpoints

func InstancesFromEndpoints(client corev1.EndpointsGetter) LookupInstances

type MetricReader

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

func NewMetricReader

func NewMetricReader(reader io.Reader) *MetricReader

func (*MetricReader) Done

func (mReader *MetricReader) Done() bool

Done tells us if there is anything left to read

func (*MetricReader) Read

func (mReader *MetricReader) Read() []byte

Jump to

Keyboard shortcuts

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