dashboards

package
v2.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpLogStore

type OpLogStore interface {
	AddLogEntryTx(ctx context.Context, tx kv.Tx, k, v []byte, t time.Time) error
	ForEachLogEntryTx(ctx context.Context, tx kv.Tx, k []byte, opts influxdb.FindOptions, fn func([]byte, time.Time) error) error
}

OpLogStore is a type which persists and reports operation log entries on a backing kv store transaction.

type Service

type Service struct {
	IDGenerator   platform.IDGenerator
	TimeGenerator influxdb.TimeGenerator
	// contains filtered or unexported fields
}

func NewService

func NewService(store kv.Store, opLog OpLogStore) *Service

NewService constructs and configures a new dashboard service.

func (*Service) AddDashboardCell

func (s *Service) AddDashboardCell(ctx context.Context, id platform.ID, cell *influxdb.Cell, opts influxdb.AddDashboardCellOptions) error

AddDashboardCell adds a cell to a dashboard and sets the cells ID.

func (*Service) CreateDashboard

func (s *Service) CreateDashboard(ctx context.Context, d *influxdb.Dashboard) error

CreateDashboard creates a influxdb dashboard and sets d.ID.

func (*Service) DeleteDashboard

func (s *Service) DeleteDashboard(ctx context.Context, id platform.ID) error

DeleteDashboard deletes a dashboard and prunes it from the index.

func (*Service) FindDashboard

func (s *Service) FindDashboard(ctx context.Context, filter influxdb.DashboardFilter, opts ...influxdb.FindOptions) (*influxdb.Dashboard, error)

FindDashboard retrieves a dashboard using an arbitrary dashboard filter.

func (*Service) FindDashboardByID

func (s *Service) FindDashboardByID(ctx context.Context, id platform.ID) (*influxdb.Dashboard, error)

FindDashboardByID retrieves a dashboard by id.

func (*Service) FindDashboards

func (s *Service) FindDashboards(ctx context.Context, filter influxdb.DashboardFilter, opts influxdb.FindOptions) ([]*influxdb.Dashboard, int, error)

FindDashboards retrieves all dashboards that match an arbitrary dashboard filter.

func (*Service) GetDashboardCellView

func (s *Service) GetDashboardCellView(ctx context.Context, dashboardID, cellID platform.ID) (*influxdb.View, error)

GetDashboardCellView retrieves the view for a dashboard cell.

func (*Service) GetDashboardOperationLog

func (s *Service) GetDashboardOperationLog(ctx context.Context, id platform.ID, opts influxdb.FindOptions) ([]*influxdb.OperationLogEntry, int, error)

GetDashboardOperationLog retrieves a dashboards operation log.

func (*Service) PutDashboard

func (s *Service) PutDashboard(ctx context.Context, d *influxdb.Dashboard) error

PutDashboard will put a dashboard without setting an ID.

func (*Service) RemoveDashboardCell

func (s *Service) RemoveDashboardCell(ctx context.Context, dashboardID, cellID platform.ID) error

RemoveDashboardCell removes a cell from a dashboard.

func (*Service) ReplaceDashboardCells

func (s *Service) ReplaceDashboardCells(ctx context.Context, id platform.ID, cs []*influxdb.Cell) error

ReplaceDashboardCells updates the positions of each cell in a dashboard concurrently.

func (*Service) UpdateDashboard

func (s *Service) UpdateDashboard(ctx context.Context, id platform.ID, upd influxdb.DashboardUpdate) (*influxdb.Dashboard, error)

UpdateDashboard updates a dashboard according the parameters set on upd.

func (*Service) UpdateDashboardCell

func (s *Service) UpdateDashboardCell(ctx context.Context, dashboardID, cellID platform.ID, upd influxdb.CellUpdate) (*influxdb.Cell, error)

UpdateDashboardCell udpates a cell on a dashboard.

func (*Service) UpdateDashboardCellView

func (s *Service) UpdateDashboardCellView(ctx context.Context, dashboardID, cellID platform.ID, upd influxdb.ViewUpdate) (*influxdb.View, error)

UpdateDashboardCellView updates the view for a dashboard cell.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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