Documentation ¶
Index ¶
- func Factory(ctx context.Context) datasource.InstanceFactoryFunc
- func Nodegraph(link string, queryPid Pid) (resp backend.DataResponse)
- type Instance
- func (instance *Instance) CallResource(_ context.Context, req *backend.CallResourceRequest, ...) error
- func (instance *Instance) CheckHealth(_ context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (instance *Instance) Dispose()
- func (dsi *Instance) PublishStream(_ context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
- func (instance *Instance) QueryData(_ context.Context, req *backend.QueryDataRequest) (resp *backend.QueryDataResponse, err error)
- func (dsi *Instance) RunStream(ctx context.Context, req *backend.RunStreamRequest, ...) error
- func (dsi *Instance) SubscribeStream(_ context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
- type Pid
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Factory ¶
func Factory(ctx context.Context) datasource.InstanceFactoryFunc
Types ¶
type Instance ¶
type Instance struct { Health struct { Checks int `json:"checks"` } `json:"health"` Query struct { Requests int `json:"requests"` Queries int `json:"count"` } `json:"query"` Stream struct { Streams int `json:"count"` Messages int `json:"messages"` Subscriptions int `json:"subscriptions"` Published int `json:"published"` Errors int `json:"errors"` } `json:"stream"` // contains filtered or unexported fields }
Instance of the datasource.
func (*Instance) CallResource ¶
func (instance *Instance) CallResource(_ context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
CallResource of data source.
func (*Instance) CheckHealth ¶
func (instance *Instance) CheckHealth(_ context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
CheckHealth run when "save and test" of data source run.
func (*Instance) Dispose ¶
func (instance *Instance) Dispose()
Dispose run when instance cleaned up.
func (*Instance) PublishStream ¶
func (dsi *Instance) PublishStream(_ context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
PublishStream sends client message to the stream.
func (*Instance) QueryData ¶
func (instance *Instance) QueryData(_ context.Context, req *backend.QueryDataRequest) (resp *backend.QueryDataResponse, err error)
QueryData handler for data source.
func (*Instance) RunStream ¶
func (dsi *Instance) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error
RunStream initiates data source's stream to channel.
func (*Instance) SubscribeStream ¶
func (dsi *Instance) SubscribeStream(_ context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
SubscribeStream connects client to stream.
Click to show internal directories.
Click to hide internal directories.