backendplugin

package
v0.0.0-...-fb7f86c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package backendplugin contains backend plugin related logic.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrPluginNotRegistered error returned when plugin is not registered.
	ErrPluginNotRegistered = errors.New("plugin not registered")
	// ErrHealthCheckFailed error returned when health check failed.
	ErrHealthCheckFailed = errors.New("health check failed")
	// ErrPluginUnavailable error returned when plugin is unavailable.
	ErrPluginUnavailable = errors.New("plugin unavailable")
	// ErrMethodNotImplemented error returned when plugin method not implemented.
	ErrMethodNotImplemented = errors.New("method not implemented")
)

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	PluginID() string
	Logger() log.Logger
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	IsManaged() bool
	Exited() bool
	Decommission() error
	IsDecommissioned() bool
	Target() Target
	backend.CollectMetricsHandler
	backend.CheckHealthHandler
	backend.QueryDataHandler
	backend.CallResourceHandler
	backend.StreamHandler
}

Plugin is the backend plugin interface.

type PluginFactoryFunc

type PluginFactoryFunc func(pluginID string, logger log.Logger, env []string) (Plugin, error)

PluginFactoryFunc is a function type for creating a Plugin.

type Target

type Target string
const (
	TargetNone     Target = "none"
	TargetUnknown  Target = "unknown"
	TargetInMemory Target = "in_memory"
	TargetLocal    Target = "local"
)

Directories

Path Synopsis
Package instrumentation contains backend plugin instrumentation logic.
Package instrumentation contains backend plugin instrumentation logic.

Jump to

Keyboard shortcuts

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