Documentation ¶
Index ¶
- type ConvertDryRunRequest
- type ConvertDryRunResponse
- type CoreGrafanaScope
- type DryRunRuleStorage
- func (s *DryRunRuleStorage) CreateChannelRule(_ context.Context, _ int64, _ pipeline.ChannelRuleCreateCmd) (pipeline.ChannelRule, error)
- func (s *DryRunRuleStorage) CreateWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigCreateCmd) (pipeline.WriteConfig, error)
- func (s *DryRunRuleStorage) DeleteChannelRule(_ context.Context, _ int64, _ pipeline.ChannelRuleDeleteCmd) error
- func (s *DryRunRuleStorage) DeleteWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigDeleteCmd) error
- func (s *DryRunRuleStorage) GetWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigGetCmd) (pipeline.WriteConfig, bool, error)
- func (s *DryRunRuleStorage) ListChannelRules(_ context.Context, _ int64) ([]pipeline.ChannelRule, error)
- func (s *DryRunRuleStorage) ListWriteConfigs(_ context.Context, _ int64) ([]pipeline.WriteConfig, error)
- func (s *DryRunRuleStorage) UpdateChannelRule(_ context.Context, _ int64, _ pipeline.ChannelRuleUpdateCmd) (pipeline.ChannelRule, error)
- func (s *DryRunRuleStorage) UpdateWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigUpdateCmd) (pipeline.WriteConfig, error)
- type GrafanaLive
- func (g *GrafanaLive) ClientCount(orgID int64, channel string) (int, error)
- func (g *GrafanaLive) GetChannelHandler(user *models.SignedInUser, channel string) (models.ChannelHandler, live.Channel, error)
- func (g *GrafanaLive) GetChannelHandlerFactory(user *models.SignedInUser, scope string, namespace string) (models.ChannelHandlerFactory, error)
- func (g *GrafanaLive) HandleChannelRulesDeleteHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleChannelRulesListHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleChannelRulesPostHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleChannelRulesPutHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleDatasourceDelete(orgID int64, dsUID string)
- func (g *GrafanaLive) HandleDatasourceUpdate(orgID int64, dsUID string)
- func (g *GrafanaLive) HandleHTTPPublish(ctx *models.ReqContext, cmd dtos.LivePublishCmd) response.Response
- func (g *GrafanaLive) HandleInfoHTTP(ctx *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleListHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandlePipelineConvertTestHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandlePipelineEntitiesListHTTP(_ *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleWriteConfigsDeleteHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleWriteConfigsListHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleWriteConfigsPostHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) HandleWriteConfigsPutHTTP(c *models.ReqContext) response.Response
- func (g *GrafanaLive) IsHA() bool
- func (g *GrafanaLive) Publish(orgID int64, channel string, data []byte) error
- func (g *GrafanaLive) Run(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConvertDryRunRequest ¶
type ConvertDryRunRequest struct { ChannelRules []pipeline.ChannelRule `json:"channelRules"` Channel string `json:"channel"` Data string `json:"data"` }
type ConvertDryRunResponse ¶
type ConvertDryRunResponse struct {
ChannelFrames []*pipeline.ChannelFrame `json:"channelFrames"`
}
type CoreGrafanaScope ¶
type CoreGrafanaScope struct { Features map[string]models.ChannelHandlerFactory // The generic service to advertise dashboard changes Dashboards models.DashboardActivityChannel }
CoreGrafanaScope list of core features
type DryRunRuleStorage ¶
type DryRunRuleStorage struct {
ChannelRules []pipeline.ChannelRule
}
func (*DryRunRuleStorage) CreateChannelRule ¶
func (s *DryRunRuleStorage) CreateChannelRule(_ context.Context, _ int64, _ pipeline.ChannelRuleCreateCmd) (pipeline.ChannelRule, error)
func (*DryRunRuleStorage) CreateWriteConfig ¶
func (s *DryRunRuleStorage) CreateWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigCreateCmd) (pipeline.WriteConfig, error)
func (*DryRunRuleStorage) DeleteChannelRule ¶
func (s *DryRunRuleStorage) DeleteChannelRule(_ context.Context, _ int64, _ pipeline.ChannelRuleDeleteCmd) error
func (*DryRunRuleStorage) DeleteWriteConfig ¶
func (s *DryRunRuleStorage) DeleteWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigDeleteCmd) error
func (*DryRunRuleStorage) GetWriteConfig ¶
func (s *DryRunRuleStorage) GetWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigGetCmd) (pipeline.WriteConfig, bool, error)
func (*DryRunRuleStorage) ListChannelRules ¶
func (s *DryRunRuleStorage) ListChannelRules(_ context.Context, _ int64) ([]pipeline.ChannelRule, error)
func (*DryRunRuleStorage) ListWriteConfigs ¶
func (s *DryRunRuleStorage) ListWriteConfigs(_ context.Context, _ int64) ([]pipeline.WriteConfig, error)
func (*DryRunRuleStorage) UpdateChannelRule ¶
func (s *DryRunRuleStorage) UpdateChannelRule(_ context.Context, _ int64, _ pipeline.ChannelRuleUpdateCmd) (pipeline.ChannelRule, error)
func (*DryRunRuleStorage) UpdateWriteConfig ¶
func (s *DryRunRuleStorage) UpdateWriteConfig(_ context.Context, _ int64, _ pipeline.WriteConfigUpdateCmd) (pipeline.WriteConfig, error)
type GrafanaLive ¶
type GrafanaLive struct { PluginContextProvider *plugincontext.Provider Cfg *setting.Cfg RouteRegister routing.RouteRegister LogsService *cloudwatch.LogsService CacheService *localcache.CacheService DataSourceCache datasources.CacheService SQLStore *sqlstore.SQLStore SecretsService secrets.Service // The core internal features GrafanaScope CoreGrafanaScope ManagedStreamRunner *managedstream.Runner Pipeline *pipeline.Pipeline // contains filtered or unexported fields }
GrafanaLive manages live real-time connections to Grafana (over WebSocket at this moment). The main concept here is Channel. Connections can subscribe to many channels. Each channel can have different permissions and properties but once a connection subscribed to a channel it starts receiving all messages published into this channel. Thus GrafanaLive is a PUB/SUB server.
func ProvideService ¶
func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, routeRegister routing.RouteRegister, logsService *cloudwatch.LogsService, pluginStore plugins.Store, cacheService *localcache.CacheService, dataSourceCache datasources.CacheService, sqlStore *sqlstore.SQLStore, secretsService secrets.Service, usageStatsService usagestats.Service) (*GrafanaLive, error)
func (*GrafanaLive) ClientCount ¶
func (g *GrafanaLive) ClientCount(orgID int64, channel string) (int, error)
ClientCount returns the number of clients.
func (*GrafanaLive) GetChannelHandler ¶
func (g *GrafanaLive) GetChannelHandler(user *models.SignedInUser, channel string) (models.ChannelHandler, live.Channel, error)
GetChannelHandler gives thread-safe access to the channel.
func (*GrafanaLive) GetChannelHandlerFactory ¶
func (g *GrafanaLive) GetChannelHandlerFactory(user *models.SignedInUser, scope string, namespace string) (models.ChannelHandlerFactory, error)
GetChannelHandlerFactory gets a ChannelHandlerFactory for a namespace. It gives thread-safe access to the channel.
func (*GrafanaLive) HandleChannelRulesDeleteHTTP ¶
func (g *GrafanaLive) HandleChannelRulesDeleteHTTP(c *models.ReqContext) response.Response
HandleChannelRulesDeleteHTTP ...
func (*GrafanaLive) HandleChannelRulesListHTTP ¶
func (g *GrafanaLive) HandleChannelRulesListHTTP(c *models.ReqContext) response.Response
HandleChannelRulesListHTTP ...
func (*GrafanaLive) HandleChannelRulesPostHTTP ¶
func (g *GrafanaLive) HandleChannelRulesPostHTTP(c *models.ReqContext) response.Response
HandleChannelRulesPostHTTP ...
func (*GrafanaLive) HandleChannelRulesPutHTTP ¶
func (g *GrafanaLive) HandleChannelRulesPutHTTP(c *models.ReqContext) response.Response
HandleChannelRulesPutHTTP ...
func (*GrafanaLive) HandleDatasourceDelete ¶
func (g *GrafanaLive) HandleDatasourceDelete(orgID int64, dsUID string)
func (*GrafanaLive) HandleDatasourceUpdate ¶
func (g *GrafanaLive) HandleDatasourceUpdate(orgID int64, dsUID string)
func (*GrafanaLive) HandleHTTPPublish ¶
func (g *GrafanaLive) HandleHTTPPublish(ctx *models.ReqContext, cmd dtos.LivePublishCmd) response.Response
func (*GrafanaLive) HandleInfoHTTP ¶
func (g *GrafanaLive) HandleInfoHTTP(ctx *models.ReqContext) response.Response
HandleInfoHTTP special http response for
func (*GrafanaLive) HandleListHTTP ¶
func (g *GrafanaLive) HandleListHTTP(c *models.ReqContext) response.Response
HandleListHTTP returns metadata so the UI can build a nice form
func (*GrafanaLive) HandlePipelineConvertTestHTTP ¶
func (g *GrafanaLive) HandlePipelineConvertTestHTTP(c *models.ReqContext) response.Response
HandlePipelineConvertTestHTTP ...
func (*GrafanaLive) HandlePipelineEntitiesListHTTP ¶
func (g *GrafanaLive) HandlePipelineEntitiesListHTTP(_ *models.ReqContext) response.Response
HandlePipelineEntitiesListHTTP ...
func (*GrafanaLive) HandleWriteConfigsDeleteHTTP ¶
func (g *GrafanaLive) HandleWriteConfigsDeleteHTTP(c *models.ReqContext) response.Response
HandleWriteConfigsDeleteHTTP ...
func (*GrafanaLive) HandleWriteConfigsListHTTP ¶
func (g *GrafanaLive) HandleWriteConfigsListHTTP(c *models.ReqContext) response.Response
HandleWriteConfigsListHTTP ...
func (*GrafanaLive) HandleWriteConfigsPostHTTP ¶
func (g *GrafanaLive) HandleWriteConfigsPostHTTP(c *models.ReqContext) response.Response
HandleWriteConfigsPostHTTP ...
func (*GrafanaLive) HandleWriteConfigsPutHTTP ¶
func (g *GrafanaLive) HandleWriteConfigsPutHTTP(c *models.ReqContext) response.Response
HandleWriteConfigsPutHTTP ...
func (*GrafanaLive) IsHA ¶
func (g *GrafanaLive) IsHA() bool
Directories ¶
Path | Synopsis |
---|---|
Package features is a generated GoMock package.
|
Package features is a generated GoMock package. |
Package pipeline is a generated GoMock package.
|
Package pipeline is a generated GoMock package. |
Package runstream is a generated GoMock package.
|
Package runstream is a generated GoMock package. |