Documentation ¶
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 = errors.New("plugin unavailable") // ErrMethodNotImplemented error returned when plugin method not implemented. ErrMethodNotImplemented = errors.New("method not implemented") )
Functions ¶
func InstrumentQueryDataHandler ¶
func InstrumentQueryDataHandler(handler backend.QueryDataHandler) backend.QueryDataHandler
InstrumentQueryDataHandler wraps a backend.QueryDataHandler with instrumentation of success rate and latency.
func InstrumentQueryDataRequest ¶
InstrumentQueryDataRequest instruments success rate and latency of query data request.
Types ¶
type CallResourceClientResponseStream ¶
type CallResourceClientResponseStream interface { Recv() (*backend.CallResourceResponse, error) Close() error }
CallResourceClientResponseStream is used for receiving resource call responses.
type Manager ¶
type Manager interface { // Register registers a backend plugin Register(pluginID string, factory PluginFactoryFunc) error // StartPlugin starts a non-managed backend plugin StartPlugin(ctx context.Context, pluginID string) error // CollectMetrics collects metrics from a registered backend plugin. CollectMetrics(ctx context.Context, pluginID string) (*backend.CollectMetricsResult, error) // CheckHealth checks the health of a registered backend plugin. CheckHealth(ctx context.Context, pCtx backend.PluginContext) (*backend.CheckHealthResult, error) // CallResource calls a plugin resource. CallResource(pluginConfig backend.PluginContext, ctx *models.ReqContext, path string) }
Manager manages backend plugins.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.