# Packages
Package app provides utilities for creating and serving a app plugin over gRPC.
Package datasource provides utilities for creating and serving a data source plugin over gRPC.
Package grpcplugin provides support for serving plugin over gRPC.
No description provided by the author
Package httpclient provides HTTP client and outgoing HTTP request middleware.
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
FrameResponse creates a DataResponse that contains the Framer's data.Frames.
FrameResponseWithError creates a DataResponse with the error's contents (if not nil), and the Framer's data.Frames.
FromProto returns a new ConvertFromProtobuf.
JSONDataFromHTTPClientOptions extracts JSON data from CustomOptions of httpclient.Options.
NewInitialData allows sending JSON on subscription.
NewInitialFrame allows creating frame as subscription InitialData.
NewQueryDataResponse returns a QueryDataResponse with the Responses property initialized.
No description provided by the author
SecureJSONDataFromHTTPClientOptions extracts secure JSON data from CustomOptions of httpclient.Options.
Serve starts serving the plugin over gRPC.
SetupPluginEnvironment will read the environment variables and apply the standard environment behavior.
StandaloneServe starts a gRPC server that is not managed by hashicorp.
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.
PublishStreamStatusNotFound means stream does not exist at all.
PublishStreamStatusOK means publication is allowed.
PublishStreamStatusPermissionDenied means that user is not allowed to publish.
SubscribeStreamStatusNotFound means stream does not exist at all.
SubscribeStreamStatusOK means subscription is allowed.
SubscribeStreamStatusPermissionDenied means that user is not allowed to subscribe.
# Variables
Logger is the default logger instance.
PluginProfilerEnvDeprecated is a deprecated constant for the GF_PLUGINS_PROFILER environment variable used to enable pprof.
PluginProfilerPortEnvDeprecated is a constant for the GF_PLUGINS_PROFILER_PORT environment variable use to specify a pprof port (default 6060).
PluginProfilingEnabledEnv is a constant for the GF_PLUGIN_PROFILING_ENABLED environment variable used to enable pprof.
PluginProfilingPortEnv is a constant for the GF_PLUGIN_PROFILING_PORT environment variable use to specify a pprof port (default 6060).
# 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.
CollectMetricsRequest contains the metrics request.
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.
HTTPSettings is a convenient struct for holding decoded HTTP settings from jsonData and secureJSONData.
InitialData to send to a client upon a successful subscription to a channel.
PluginContext holds contextual information about a plugin request, such as Grafana organization, user and plugin instance settings.
PublishStreamRequest is EXPERIMENTAL and is a subject to change till Grafana 8.
PublishStreamResponse is EXPERIMENTAL and is a subject to change till Grafana 8.
QueryDataRequest contains a single request which contains multiple queries.
QueryDataResponse contains the results from a QueryDataRequest.
RunStreamRequest is EXPERIMENTAL and is a subject to change till Grafana 8.
ServeOpts options for serving plugins.
StreamPacket is EXPERIMENTAL and is a subject to change till Grafana 8.
StreamSender allows sending data to a stream.
SubscribeStreamRequest is EXPERIMENTAL and is a subject to change till Grafana 8.
SubscribeStreamResponse is EXPERIMENTAL and is a subject to change till Grafana 8.
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.
StreamHandler handles streams.
StreamPacketSender is EXPERIMENTAL and is a subject to change till Grafana 8.
# 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.
PublishStreamStatus is a status of publication response.
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.
SubscribeStreamStatus is a status of subscription response.