Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInstanceManager ¶
func NewInstanceManager(fn InstanceFactoryFunc) instancemgmt.InstanceManager
NewInstanceManager creates a new data source instance manager,
This is a helper method for calling NewInstanceProvider and creating a new instancemgmt.InstanceProvider, and providing that to instancemgmt.New.
func NewInstanceProvider ¶
func NewInstanceProvider(fn InstanceFactoryFunc) instancemgmt.InstanceProvider
NewInstanceProvider create a new data source instance provuder,
The instance provider is responsible for providing cache keys for data source instances, creating new instances when needed and invalidating cached instances when they have been updated in Grafana. Cache key is based on the numerical data source identifier. If fn is nil, NewInstanceProvider panics.
Types ¶
type InstanceFactoryFunc ¶
type InstanceFactoryFunc func(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
InstanceFactoryFunc factory method for creating data source instances.
type ServeOpts ¶
type ServeOpts struct { // CheckHealthHandler handler for health checks. // Optional to implement. backend.CheckHealthHandler // CallResourceHandler handler for resource calls. // Optional to implement. backend.CallResourceHandler // QueryDataHandler handler for data queries. // Required to implement. backend.QueryDataHandler // GRPCSettings settings for gPRC. GRPCSettings backend.GRPCSettings }
ServeOpts options for serving a data source plugin.