features

package
v0.0.0-...-34a2968 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BroadcastRunner

type BroadcastRunner struct{}

BroadcastRunner will simply broadcast all events to `grafana/broadcast/*` channels This makes no assumptions about the shape of the data and will broadcast it to anyone listening

func (*BroadcastRunner) GetChannelOptions

func (g *BroadcastRunner) GetChannelOptions(id string) centrifuge.ChannelOptions

GetChannelOptions called fast and often

func (*BroadcastRunner) GetHandlerForPath

func (g *BroadcastRunner) GetHandlerForPath(path string) (models.ChannelHandler, error)

GetHandlerForPath called on init

func (*BroadcastRunner) OnPublish

OnPublish called when an event is received from the websocket

func (*BroadcastRunner) OnSubscribe

OnSubscribe for now allows anyone to subscribe to any dashboard

type DashboardHandler

type DashboardHandler struct {
	// contains filtered or unexported fields
}

DashboardHandler manages all the `grafana/dashboard/*` channels

func CreateDashboardHandler

func CreateDashboardHandler(p models.ChannelPublisher) DashboardHandler

CreateDashboardHandler Initialize a dashboard handler

func (*DashboardHandler) DashboardDeleted

func (g *DashboardHandler) DashboardDeleted(uid string, userID int64) error

DashboardDeleted will broadcast to all connected dashboards

func (*DashboardHandler) DashboardSaved

func (g *DashboardHandler) DashboardSaved(uid string, userID int64) error

DashboardSaved will broadcast to all connected dashboards

func (*DashboardHandler) GetChannelOptions

func (g *DashboardHandler) GetChannelOptions(id string) centrifuge.ChannelOptions

GetChannelOptions called fast and often

func (*DashboardHandler) GetHandlerForPath

func (g *DashboardHandler) GetHandlerForPath(path string) (models.ChannelHandler, error)

GetHandlerForPath called on init

func (*DashboardHandler) OnPublish

OnPublish called when an event is received from the websocket

func (*DashboardHandler) OnSubscribe

OnSubscribe for now allows anyone to subscribe to any dashboard

type TestdataSupplier

type TestdataSupplier struct {
	// contains filtered or unexported fields
}

TestdataSupplier manages all the `grafana/testdata/*` channels

func CreateTestdataSupplier

func CreateTestdataSupplier(p models.ChannelPublisher) TestdataSupplier

CreateTestdataSupplier Initialize a dashboard handler

func (*TestdataSupplier) GetHandlerForPath

func (g *TestdataSupplier) GetHandlerForPath(path string) (models.ChannelHandler, error)

GetHandlerForPath called on init

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL