Documentation ¶
Index ¶
- Constants
- type Store
- func (f *Store) DeleteAlertConfig(_ context.Context, user string) error
- func (f *Store) DeleteFullState(ctx context.Context, user string) error
- func (f *Store) GetAlertConfig(_ context.Context, user string) (alertspb.AlertConfigDesc, error)
- func (f *Store) GetAlertConfigs(_ context.Context, userIDs []string) (map[string]alertspb.AlertConfigDesc, error)
- func (f *Store) GetFullState(ctx context.Context, user string) (alertspb.FullStateDesc, error)
- func (f *Store) ListAllUsers(_ context.Context) ([]string, error)
- func (f *Store) ListUsersWithFullState(ctx context.Context) ([]string, error)
- func (f *Store) SetAlertConfig(_ context.Context, cfg alertspb.AlertConfigDesc) error
- func (f *Store) SetFullState(ctx context.Context, user string, cfg alertspb.FullStateDesc) error
- type StoreConfig
Constants ¶
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 ¶
DeleteAlertConfig implements alertstore.AlertStore.
func (*Store) DeleteFullState ¶ added in v1.9.0
DeleteFullState implements alertstore.AlertStore.
func (*Store) GetAlertConfig ¶
GetAlertConfig implements alertstore.AlertStore.
func (*Store) GetAlertConfigs ¶
func (f *Store) GetAlertConfigs(_ context.Context, userIDs []string) (map[string]alertspb.AlertConfigDesc, error)
GetAlertConfigs implements alertstore.AlertStore.
func (*Store) GetFullState ¶ added in v1.9.0
GetFullState implements alertstore.AlertStore.
func (*Store) ListAllUsers ¶
ListAllUsers implements alertstore.AlertStore.
func (*Store) ListUsersWithFullState ¶ added in v1.10.0
ListUsersWithFullState implements alertstore.AlertStore.
func (*Store) SetAlertConfig ¶
SetAlertConfig implements alertstore.AlertStore.
func (*Store) SetFullState ¶ added in v1.9.0
SetFullState implements alertstore.AlertStore.
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.