connector

package
v0.0.0-...-202a999 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PatternKeywordSource represents the pattern keyword value for source name.
	PatternKeywordSource = "source"
	// PatternKeywordMetric represents the pattern keyword value for metric name.
	PatternKeywordMetric = "metric"
)

Variables

View Source
var (
	// ErrInvalidAttribute represents an invalid attribute error.
	ErrInvalidAttribute = errors.New("invalid attribute")
	// ErrMissingMetricPattern represents a missing metric pattern keyword error.
	ErrMissingMetricPattern = errors.New("missing \"metric\" pattern keyword")
	// ErrMissingSourcePattern represents a missing source pattern keyword error.
	ErrMissingSourcePattern = errors.New("missing \"source\" pattern keyword")
	// ErrUnsupportedConnector represents an unsupported connector handler error.
	ErrUnsupportedConnector = errors.New("unsupported connector handler")
	// ErrUnknownSource represents an unknown source error.
	ErrUnknownSource = errors.New("unknown source")
	// ErrUnknownMetric represents an unknown metric error.
	ErrUnknownMetric = errors.New("unknown metric")
)

Functions

func Connectors

func Connectors() []string

Connectors returns the list of supported connectors.

func ErrMissingConnectorSetting

func ErrMissingConnectorSetting(key string) error

ErrMissingConnectorSetting creates a new missing connector setting error.

Types

type Connector

type Connector interface {
	Name() string
	Points(*series.Query) ([]series.Series, error)
	Refresh(chan<- *catalog.Record) error
}

Connector represents a connector handler interface.

func New

func New(typ, name string, settings *maputil.Map, logger *logger.Logger) (Connector, error)

New creates a new instance of a connector handler.

Jump to

Keyboard shortcuts

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