memdb

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 0

Documentation

Overview

Package memdb provides a transient layer to store the InfluxDB and Kapacitor configured via flags at Chronograf start. Caution should be taken when editing resources generated from cli flags, especially in a distributed environment as unexpected behavior may occur. Instead, it is suggested that chronograf be restarted to pick up the new flag/evar changes.

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