Documentation ¶
Index ¶
- func NewApp(ctx context.Context, appSettings backend.AppInstanceSettings) (instancemgmt.Instance, error)
- type App
- func (a *App) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (a *App) Dispose()
- func (a *App) PublishStream(context.Context, *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
- func (a *App) RunStream(ctx context.Context, req *backend.RunStreamRequest, ...) error
- func (a *App) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
- type EventDone
- type EventError
- type OpenAISettings
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApp ¶
func NewApp(ctx context.Context, appSettings backend.AppInstanceSettings) (instancemgmt.Instance, error)
NewApp creates a new example *App instance.
Types ¶
type App ¶
type App struct { backend.CallResourceHandler // contains filtered or unexported fields }
App is an example app backend plugin which can respond to data queries.
func (*App) CheckHealth ¶
func (a *App) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
CheckHealth handles health checks sent from Grafana to the plugin. It returns whether each feature is working based on the plugin settings.
func (*App) Dispose ¶
func (a *App) Dispose()
Dispose here tells plugin SDK that plugin wants to clean up resources when a new instance created.
func (*App) PublishStream ¶
func (a *App) PublishStream(context.Context, *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
func (*App) RunStream ¶
func (a *App) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error
func (*App) SubscribeStream ¶
func (a *App) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
type EventError ¶ added in v0.3.0
type EventError struct {
Error string `json:"error"`
}
type OpenAISettings ¶
type Settings ¶
type Settings struct { OpenAI OpenAISettings `json:"openAI"` Vector vector.VectorSettings `json:"vector"` }
Click to show internal directories.
Click to hide internal directories.