backendplugin

package
v0.0.85-test Latest Latest
Warning

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

Go to latest
Published: May 8, 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 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
	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.

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