Documentation ¶
Index ¶
- func NewMQTTInstance(s backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
- type MQTTDatasource
- func (ds *MQTTDatasource) CheckHealth(_ context.Context, _ *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (ds *MQTTDatasource) Dispose()
- func (ds *MQTTDatasource) PublishStream(_ context.Context, _ *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
- func (ds *MQTTDatasource) QueryData(_ context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
- func (ds *MQTTDatasource) RunStream(ctx context.Context, req *backend.RunStreamRequest, ...) error
- func (ds *MQTTDatasource) SubscribeStream(_ context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMQTTInstance ¶
func NewMQTTInstance(s backend.DataSourceInstanceSettings) (instancemgmt.Instance, error)
NewMQTTDatasource creates a new datasource instance.
Types ¶
type MQTTDatasource ¶
func NewMQTTDatasource ¶
func NewMQTTDatasource(client mqtt.Client, uid string) *MQTTDatasource
NewMQTTDatasource creates a new datasource instance.
func (*MQTTDatasource) CheckHealth ¶
func (ds *MQTTDatasource) CheckHealth(_ context.Context, _ *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
func (*MQTTDatasource) Dispose ¶
func (ds *MQTTDatasource) Dispose()
Dispose here tells plugin SDK that plugin wants to clean up resources when a new instance created. As soon as datasource settings change detected by SDK old datasource instance will be disposed and a new one will be created using NewMQTTDatasource factory function.
func (*MQTTDatasource) PublishStream ¶
func (ds *MQTTDatasource) PublishStream(_ context.Context, _ *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
func (*MQTTDatasource) QueryData ¶
func (ds *MQTTDatasource) QueryData(_ context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
func (*MQTTDatasource) RunStream ¶
func (ds *MQTTDatasource) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error
func (*MQTTDatasource) SubscribeStream ¶
func (ds *MQTTDatasource) SubscribeStream(_ context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
Click to show internal directories.
Click to hide internal directories.