Documentation ¶
Index ¶
- Constants
- type BucketAlertStore
- func (s *BucketAlertStore) DeleteAlertConfig(ctx context.Context, userID string) error
- func (s *BucketAlertStore) DeleteFullGrafanaState(ctx context.Context, userID string) error
- func (s *BucketAlertStore) DeleteFullState(ctx context.Context, userID string) error
- func (s *BucketAlertStore) DeleteGrafanaAlertConfig(ctx context.Context, userID string) error
- func (s *BucketAlertStore) GetAlertConfig(ctx context.Context, userID string) (alertspb.AlertConfigDesc, error)
- func (s *BucketAlertStore) GetAlertConfigs(ctx context.Context, userIDs []string) (map[string]alertspb.AlertConfigDescs, error)
- func (s *BucketAlertStore) GetFullGrafanaState(ctx context.Context, userID string) (alertspb.FullStateDesc, error)
- func (s *BucketAlertStore) GetFullState(ctx context.Context, userID string) (alertspb.FullStateDesc, error)
- func (s *BucketAlertStore) GetGrafanaAlertConfig(ctx context.Context, userID string) (alertspb.GrafanaAlertConfigDesc, error)
- func (s *BucketAlertStore) ListAllUsers(ctx context.Context) ([]string, error)
- func (s *BucketAlertStore) ListUsersWithFullState(ctx context.Context) ([]string, error)
- func (s *BucketAlertStore) SetAlertConfig(ctx context.Context, cfg alertspb.AlertConfigDesc) error
- func (s *BucketAlertStore) SetFullGrafanaState(ctx context.Context, userID string, fs alertspb.FullStateDesc) error
- func (s *BucketAlertStore) SetFullState(ctx context.Context, userID string, fs alertspb.FullStateDesc) error
- func (s *BucketAlertStore) SetGrafanaAlertConfig(ctx context.Context, cfg alertspb.GrafanaAlertConfigDesc) error
- type BucketAlertStoreConfig
Constants ¶
View Source
const ( // AlertsPrefix is the bucket prefix under which all tenants alertmanager configs are stored. // Note that objects stored under this prefix follow the pattern: // alerts/<user-id> AlertsPrefix = "alerts" // AlertmanagerPrefix is the bucket prefix under which other alertmanager state is stored. // Note that objects stored under this prefix follow the pattern: // alertmanager/<user-id>/<object> AlertmanagerPrefix = "alertmanager" // GrafanaAlertmanagerPrefix is the bucket prefix under which Grafana's alertmanager configuration and state are stored. // Note that objects stored under this prefix follow the pattern: // grafana_alertmanager/<user-id>/<object> GrafanaAlertmanagerPrefix = "grafana_alertmanager" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketAlertStore ¶
type BucketAlertStore struct {
// contains filtered or unexported fields
}
BucketAlertStore is used to support the AlertStore interface against an object storage backend. It is implemented using the Thanos objstore.Bucket interface
func NewBucketAlertStore ¶
func NewBucketAlertStore(cfg BucketAlertStoreConfig, bkt objstore.Bucket, cfgProvider bucket.TenantConfigProvider, logger log.Logger) *BucketAlertStore
func (*BucketAlertStore) DeleteAlertConfig ¶
func (s *BucketAlertStore) DeleteAlertConfig(ctx context.Context, userID string) error
DeleteAlertConfig implements alertstore.AlertStore.
func (*BucketAlertStore) DeleteFullGrafanaState ¶
func (s *BucketAlertStore) DeleteFullGrafanaState(ctx context.Context, userID string) error
func (*BucketAlertStore) DeleteFullState ¶
func (s *BucketAlertStore) DeleteFullState(ctx context.Context, userID string) error
DeleteFullState implements alertstore.AlertStore.
func (*BucketAlertStore) DeleteGrafanaAlertConfig ¶
func (s *BucketAlertStore) DeleteGrafanaAlertConfig(ctx context.Context, userID string) error
func (*BucketAlertStore) GetAlertConfig ¶
func (s *BucketAlertStore) GetAlertConfig(ctx context.Context, userID string) (alertspb.AlertConfigDesc, error)
GetAlertConfig implements alertstore.AlertStore.
func (*BucketAlertStore) GetAlertConfigs ¶
func (s *BucketAlertStore) GetAlertConfigs(ctx context.Context, userIDs []string) (map[string]alertspb.AlertConfigDescs, error)
GetAlertConfigs implements alertstore.AlertStore.
func (*BucketAlertStore) GetFullGrafanaState ¶
func (s *BucketAlertStore) GetFullGrafanaState(ctx context.Context, userID string) (alertspb.FullStateDesc, error)
func (*BucketAlertStore) GetFullState ¶
func (s *BucketAlertStore) GetFullState(ctx context.Context, userID string) (alertspb.FullStateDesc, error)
GetFullState implements alertstore.AlertStore.
func (*BucketAlertStore) GetGrafanaAlertConfig ¶
func (s *BucketAlertStore) GetGrafanaAlertConfig(ctx context.Context, userID string) (alertspb.GrafanaAlertConfigDesc, error)
func (*BucketAlertStore) ListAllUsers ¶
func (s *BucketAlertStore) ListAllUsers(ctx context.Context) ([]string, error)
ListAllUsers implements alertstore.AlertStore.
func (*BucketAlertStore) ListUsersWithFullState ¶
func (s *BucketAlertStore) ListUsersWithFullState(ctx context.Context) ([]string, error)
ListUsersWithFullState implements alertstore.AlertStore.
func (*BucketAlertStore) SetAlertConfig ¶
func (s *BucketAlertStore) SetAlertConfig(ctx context.Context, cfg alertspb.AlertConfigDesc) error
SetAlertConfig implements alertstore.AlertStore.
func (*BucketAlertStore) SetFullGrafanaState ¶
func (s *BucketAlertStore) SetFullGrafanaState(ctx context.Context, userID string, fs alertspb.FullStateDesc) error
func (*BucketAlertStore) SetFullState ¶
func (s *BucketAlertStore) SetFullState(ctx context.Context, userID string, fs alertspb.FullStateDesc) error
SetFullState implements alertstore.AlertStore.
func (*BucketAlertStore) SetGrafanaAlertConfig ¶
func (s *BucketAlertStore) SetGrafanaAlertConfig(ctx context.Context, cfg alertspb.GrafanaAlertConfigDesc) error
type BucketAlertStoreConfig ¶
type BucketAlertStoreConfig struct { // Retrieve Grafana AM configs alongside Mimir AM configs. FetchGrafanaConfig bool }
Click to show internal directories.
Click to hide internal directories.