Documentation ¶
Index ¶
- type KapacitorStore
- func (store *KapacitorStore) Add(ctx context.Context, kap chronograf.Server) (chronograf.Server, error)
- func (store *KapacitorStore) All(ctx context.Context) ([]chronograf.Server, error)
- func (store *KapacitorStore) Delete(ctx context.Context, kap chronograf.Server) error
- func (store *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error)
- func (store *KapacitorStore) Update(ctx context.Context, kap chronograf.Server) error
- type SourcesStore
- func (store *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error)
- func (store *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error)
- func (store *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error
- func (store *SourcesStore) Get(ctx context.Context, id int) (chronograf.Source, error)
- func (store *SourcesStore) Update(ctx context.Context, src chronograf.Source) error
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 ¶
func (store *KapacitorStore) Add(ctx context.Context, kap chronograf.Server) (chronograf.Server, error)
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 ¶
func (store *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error)
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