memdb

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KapacitorStore

type KapacitorStore struct {
	Kapacitor *chronograf.Server
}

KapacitorStore implements the chronograf.ServersStore interface, and keeps an in-memory Kapacitor according to startup configuration

func (*KapacitorStore) Add

Add does not have any effect

func (*KapacitorStore) All

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

All will return a slice containing a configured source

func (*KapacitorStore) Delete

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

Delete removes the in-memory configured Kapacitor if its ID matches what's provided

func (*KapacitorStore) Get

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

Get returns the in-memory Kapacitor if its ID matches what's provided

func (*KapacitorStore) Update

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

Update overwrites the in-memory configured Kapacitor if its ID matches what's provided

type SourcesStore

type SourcesStore struct {
	Source *chronograf.Source
}

SourcesStore implements the chronograf.SourcesStore interface

func (*SourcesStore) Add

Add does not have any effect

func (*SourcesStore) All

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

All will return a slice containing a configured source

func (*SourcesStore) Delete

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

Delete removes the SourcesStore.Soruce if it matches the provided Source

func (*SourcesStore) Get

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

Get returns the configured source if the id matches

func (*SourcesStore) Update

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

Update does nothing

Jump to

Keyboard shortcuts

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