local

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 9 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, user string) error

DeleteAlertConfig implements alertstore.AlertStore.

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.AlertConfigDesc, error)

GetAlertConfigs implements alertstore.AlertStore.

func (*Store) ListAllUsers

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

ListAllUsers implements alertstore.AlertStore.

func (*Store) SetAlertConfig

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

SetAlertConfig 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.

Jump to

Keyboard shortcuts

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