local

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 added in v1.3.0

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

func (*Store) GetAlertConfig added in v1.3.0

func (f *Store) GetAlertConfig(ctx context.Context, user string) (alerts.AlertConfigDesc, error)

func (*Store) ListAlertConfigs

func (f *Store) ListAlertConfigs(ctx context.Context) (map[string]alerts.AlertConfigDesc, error)

ListAlertConfigs returns a list of each users alertmanager config.

func (*Store) SetAlertConfig added in v1.3.0

func (f *Store) SetAlertConfig(ctx context.Context, cfg alerts.AlertConfigDesc) error

type StoreConfig

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

StoreConfig configures a static file alertmanager store

func (*StoreConfig) RegisterFlags

func (cfg *StoreConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags related to the alertmanager file store

Jump to

Keyboard shortcuts

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