backend

package
v0.0.0-...-988d248 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DbusBackendKind = "dbus"

DbusBackendKind is the configuration kind for the dbus backend

View Source
const FileBackendKind = "file"

FileBackendKind is the configuration kind for the file backend

View Source
const UnixBackendKind = "uds"

UnixBackendKind is the configuration kind for the unix-socket backend

Variables

This section is empty.

Functions

This section is empty.

Types

type DbusBackend

type DbusBackend struct {
	Bus         string
	Destination string
	Method      string
	Path        string
}

DbusBackend is the dbus backend

func (DbusBackend) OpenMetrics

func (db DbusBackend) OpenMetrics(ctx context.Context) (io.ReadCloser, error)

OpenMetrics returns the endpoint for this backend

type FileBackend

type FileBackend struct {
	Path string
}

FileBackend is the file backend

func (FileBackend) OpenMetrics

func (fb FileBackend) OpenMetrics(ctx context.Context) (io.ReadCloser, error)

OpenMetrics returns the endpoint for this backend

type MetricsSource

type MetricsSource interface {
	OpenMetrics(context.Context) (io.ReadCloser, error)
}

MetricsSource is the general interface implemented by all backends

type UnixBackend

type UnixBackend struct {
	Path string
}

UnixBackend is the unix-socket backend

func (UnixBackend) OpenMetrics

func (ub UnixBackend) OpenMetrics(ctx context.Context) (io.ReadCloser, error)

OpenMetrics returns the endpoint for this backend

Jump to

Keyboard shortcuts

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