local

package
v0.0.0-...-f2217e9 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is used to load user alertmanager configs from a local disk

func NewStore

func NewStore(cfg StoreConfig) (*Store, error)

NewStore returns a new file alert store.

func (*Store) DeleteAlertConfig

func (f *Store) DeleteAlertConfig(_ context.Context, _ string) error

DeleteAlertConfig implements alertstore.AlertStore.

func (*Store) DeleteFullGrafanaState

func (f *Store) DeleteFullGrafanaState(_ context.Context, _ string) error

func (*Store) DeleteFullState

func (f *Store) DeleteFullState(_ context.Context, _ string) error

DeleteFullState implements alertstore.AlertStore.

func (*Store) DeleteGrafanaAlertConfig

func (f *Store) DeleteGrafanaAlertConfig(_ context.Context, _ string) error

func (*Store) GetAlertConfig

func (f *Store) GetAlertConfig(_ context.Context, user string) (alertspb.AlertConfigDesc, error)

GetAlertConfig implements alertstore.AlertStore.

func (*Store) GetAlertConfigs

func (f *Store) GetAlertConfigs(_ context.Context, userIDs []string) (map[string]alertspb.AlertConfigDescs, error)

GetAlertConfigs implements alertstore.AlertStore.

func (*Store) GetFullGrafanaState

func (f *Store) GetFullGrafanaState(_ context.Context, _ string) (alertspb.FullStateDesc, error)

func (*Store) GetFullState

func (f *Store) GetFullState(_ context.Context, _ string) (alertspb.FullStateDesc, error)

GetFullState implements alertstore.AlertStore.

func (*Store) GetGrafanaAlertConfig

func (f *Store) GetGrafanaAlertConfig(_ context.Context, _ string) (alertspb.GrafanaAlertConfigDesc, error)

func (*Store) ListAllUsers

func (f *Store) ListAllUsers(_ context.Context) ([]string, error)

ListAllUsers implements alertstore.AlertStore.

func (*Store) ListUsersWithFullState

func (f *Store) ListUsersWithFullState(_ context.Context) ([]string, error)

ListUsersWithFullState implements alertstore.AlertStore.

func (*Store) SetAlertConfig

func (f *Store) SetAlertConfig(_ context.Context, _ alertspb.AlertConfigDesc) error

SetAlertConfig implements alertstore.AlertStore.

func (*Store) SetFullGrafanaState

func (f *Store) SetFullGrafanaState(_ context.Context, _ string, _ alertspb.FullStateDesc) error

func (*Store) SetFullState

func (f *Store) SetFullState(_ context.Context, _ string, _ alertspb.FullStateDesc) error

SetFullState implements alertstore.AlertStore.

func (*Store) SetGrafanaAlertConfig

func (f *Store) SetGrafanaAlertConfig(_ context.Context, _ alertspb.GrafanaAlertConfigDesc) error

type StoreConfig

type StoreConfig struct {
	Path string `yaml:"path"`
}

StoreConfig configures a static file alertmanager store

func (*StoreConfig) RegisterFlagsWithPrefix

func (cfg *StoreConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlags registers flags related to the alertmanager local storage.

Jump to

Keyboard shortcuts

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