# Packages

Package datasource provides utilities for creating and serving a data source plugin over gRPC.
Package grpcplugin provides support for serving plugin over gRPC.
Package instancemgmt provides utilities for managing plugin instances.
Package log provides a logging interface to send logs from plugins to Grafana server.
Package resource provides utils for handling resource calls.

# Functions

FromProto returns a new ConvertFromProtobuf.
NewQueryDataResponse returns a QueryDataResponse with the Responses property initialized.
Serve starts serving the plugin over gRPC.
SetupPluginEnvironment will read the environment variables and apply the standard environment behavior.
ToProto returns a new ConvertToProtobuf.

# Constants

HealthStatusError means the plugin is in an error state.
HealthStatusOk means the status of the plugin is good.
HealthStatusUnknown means the status of the plugin is unknown.
PluginProfilerEnv is a constant for the GF_PLUGINS_PROFILER environment variable used to enable pprof.
PluginProfilerPortEnv is a constant for the GF_PLUGINS_PROFILER_PORT environment variable use to specify a pprof port (default 6060).

# Variables

Logger is the default logger instance.

# Structs

AppInstanceSettings represents settings for an app instance.
CallResourceRequest represents a request for a resource call.
CallResourceResponse represents a response from a resource call.
CheckHealthRequest contains the healthcheck request.
CheckHealthResult contains the healthcheck response.
CollectMetricsResult collect metrics result.
ConvertFromProtobuf has a collection of methods for converting from the autogenerated protobuf go code to our SDK objects.
ConvertToProtobuf has a collection of methods for converting the autogenerated protobuf go code to our SDK objects.
DataQuery represents a single query as sent from the frontend.
DataResponse contains the results from a DataQuery.
DataSourceInstanceSettings represents settings for a data source instance.
GRPCSettings settings for gRPC.
PluginContext holds contextual information about a plugin request, such as Grafana organization, user and plugin instance settings.
QueryDataRequest contains a single request which contains multiple queries.
QueryDataResponse contains the results from a QueryDataRequest.
ServeOpts options for serving plugins.
TimeRange represents a time range for a query and is a property of DataQuery.
User represents a Grafana user.

# Interfaces

CallResourceHandler handles resource calls.
CallResourceResponseSender is used for sending resource call responses.
CheckHealthHandler enables users to send health check requests to a backend plugin.
CollectMetricsHandler handles metric collection.
QueryDataHandler handles data queries.
TransformDataCallBackHandler is a type that can handle callbacks from TransformDataHandler.
TransformDataHandler is a type that can transform data.
TransformHandlers handles data transforms.

# Type aliases

CallResourceHandlerFunc is an adapter to allow the use of ordinary functions as backend.CallResourceHandler.
CheckHealthHandlerFunc is an adapter to allow the use of ordinary functions as backend.CheckHealthHandler.
CollectMetricsHandlerFunc is an adapter to allow the use of ordinary functions as backend.CollectMetricsHandler.
HealthStatus is the status of the plugin.
QueryDataHandlerFunc is an adapter to allow the use of ordinary functions as backend.QueryDataHandler.
Responses is a map of RefIDs (Unique Query ID) to DataResponses.