multistore

package
v0.0.0-...-0b6d2f4 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: AGPL-3.0, AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardsStore

type DashboardsStore struct {
	Stores []chronograf.DashboardsStore
}

DashboardsStore implements the chronograf.DashboardsStore interface, and delegates to all contained DashboardsStores

func (*DashboardsStore) Add

Add the dashboard to the first responsive Store

func (*DashboardsStore) All

All concatenates the Dashboards of all contained Stores

func (*DashboardsStore) Delete

func (multi *DashboardsStore) Delete(ctx context.Context, dashboard chronograf.Dashboard) error

Delete delegates to all Stores, returns success if one Store is successful

func (*DashboardsStore) Get

Get finds the Dashboard by id among all contained Stores

func (*DashboardsStore) Update

func (multi *DashboardsStore) Update(ctx context.Context, dashboard chronograf.Dashboard) error

Update the first responsive Store

type KapacitorStore

type KapacitorStore struct {
	Stores []chronograf.ServersStore
}

KapacitorStore implements the chronograf.ServersStore interface, and delegates to all contained KapacitorStores

func (*KapacitorStore) Add

Add the kap to the first responsive Store

func (*KapacitorStore) All

func (multi *KapacitorStore) All(ctx context.Context) ([]chronograf.Server, error)

All concatenates the Kapacitors of all contained Stores

func (*KapacitorStore) Delete

func (multi *KapacitorStore) Delete(ctx context.Context, kap chronograf.Server) error

Delete delegates to all Stores, returns success if one Store is successful

func (*KapacitorStore) Get

func (multi *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error)

Get finds the Source by id among all contained Stores

func (*KapacitorStore) Update

func (multi *KapacitorStore) Update(ctx context.Context, kap chronograf.Server) error

Update the first responsive Store

type Layouts

type Layouts struct {
	Stores []chronograf.LayoutsStore
}

Layouts is a LayoutsStore that contains multiple LayoutsStores The All method will return the set of all Layouts. Each method will be tried against the Stores slice serially.

func (*Layouts) All

func (s *Layouts) All(ctx context.Context) ([]chronograf.Layout, error)

All returns the set of all layouts

func (*Layouts) Get

func (s *Layouts) Get(ctx context.Context, ID string) (chronograf.Layout, error)

Get retrieves Layout if `ID` exists. Searches through each store sequentially until success.

type OrganizationsStore

type OrganizationsStore struct {
	Stores []chronograf.OrganizationsStore
}

OrganizationsStore implements the chronograf.OrganizationsStore interface, and delegates to all contained OrganizationsStores

func (*OrganizationsStore) Add

Add the org to the first responsive Store

func (*OrganizationsStore) All

All concatenates the Organizations of all contained Stores

func (*OrganizationsStore) CreateDefault

func (multi *OrganizationsStore) CreateDefault(ctx context.Context) error

CreateDefault makes a default organization in the first responsive Store

func (*OrganizationsStore) DefaultOrganization

func (multi *OrganizationsStore) DefaultOrganization(ctx context.Context) (*chronograf.Organization, error)

DefaultOrganization returns the first successful DefaultOrganization

func (*OrganizationsStore) Delete

Delete delegates to all Stores, returns success if one Store is successful

func (*OrganizationsStore) Get

Get finds the Organization by id among all contained Stores

func (*OrganizationsStore) Update

Update the first responsive Store

type Protoboards

type Protoboards struct {
	Stores []chronograf.ProtoboardsStore
}

Protoboards is a ProtoboardsStore that contains multiple ProtoboardsStores The All method will return the set of all Protoboards. Each method will be tried against the Stores slice serially.

func (*Protoboards) All

All returns the set of all protoboards

func (*Protoboards) Get

Get retrieves protoboard if `ID` exists. Searches through each store sequentially until success.

type SourcesStore

type SourcesStore struct {
	Stores []chronograf.SourcesStore
}

SourcesStore delegates to the SourcesStores that compose it

func (*SourcesStore) Add

Add the src to the first Store to respond successfully

func (*SourcesStore) All

func (multi *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error)

All concatenates the Sources of all contained Stores

func (*SourcesStore) Delete

func (multi *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error

Delete delegates to all stores, returns success if one Store is successful

func (*SourcesStore) Get

func (multi *SourcesStore) Get(ctx context.Context, id int) (chronograf.Source, error)

Get finds the Source by id among all contained Stores

func (*SourcesStore) Update

func (multi *SourcesStore) Update(ctx context.Context, src chronograf.Source) error

Update the first store to return a successful response

Jump to

Keyboard shortcuts

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