Documentation ¶
Index ¶
- Constants
- Variables
- type AdminConfigurationStore
- type AlertingStore
- type DBstore
- func (st DBstore) DeleteAdminConfiguration(orgID int64) error
- func (st DBstore) DeleteAlertInstance(ctx context.Context, orgID int64, ruleUID, labelsHash string) error
- func (st DBstore) DeleteAlertInstancesByRuleUID(ctx context.Context, orgID int64, ruleUID string) error
- func (st DBstore) DeleteAlertRulesByUID(ctx context.Context, orgID int64, ruleUID ...string) error
- func (st DBstore) DeleteProvenance(ctx context.Context, o models.Provisionable, org int64) error
- func (st DBstore) FetchOrgIds(ctx context.Context) ([]int64, error)
- func (st *DBstore) GetAdminConfiguration(orgID int64) (*ngmodels.AdminConfiguration, error)
- func (st DBstore) GetAdminConfigurations() ([]*ngmodels.AdminConfiguration, error)
- func (st DBstore) GetAlertInstance(ctx context.Context, cmd *models.GetAlertInstanceQuery) error
- func (st DBstore) GetAlertRuleByUID(ctx context.Context, query *ngmodels.GetAlertRuleByUIDQuery) error
- func (st DBstore) GetAlertRulesForScheduling(ctx context.Context, query *ngmodels.ListAlertRulesQuery) error
- func (st *DBstore) GetAllLatestAlertmanagerConfiguration(ctx context.Context) ([]*models.AlertConfiguration, error)
- func (st *DBstore) GetLatestAlertmanagerConfiguration(ctx context.Context, query *models.GetLatestAlertmanagerConfigurationQuery) error
- func (st DBstore) GetNamespaceByTitle(ctx context.Context, namespace string, orgID int64, user *models.SignedInUser, ...) (*models.Folder, error)
- func (st DBstore) GetOrgs(ctx context.Context) ([]int64, error)
- func (st DBstore) GetProvenance(ctx context.Context, o models.Provisionable, org int64) (models.Provenance, error)
- func (st DBstore) GetProvenances(ctx context.Context, org int64, resourceType string) (map[string]models.Provenance, error)
- func (st DBstore) GetRuleGroups(ctx context.Context, query *ngmodels.ListRuleGroupsQuery) error
- func (st DBstore) GetUserVisibleNamespaces(ctx context.Context, orgID int64, user *models.SignedInUser) (map[string]*models.Folder, error)
- func (st *DBstore) InTransaction(ctx context.Context, f func(ctx context.Context) error) error
- func (st DBstore) InsertAlertRules(ctx context.Context, rules []ngmodels.AlertRule) error
- func (st DBstore) ListAlertInstances(ctx context.Context, cmd *models.ListAlertInstancesQuery) error
- func (st DBstore) ListAlertRules(ctx context.Context, query *ngmodels.ListAlertRulesQuery) error
- func (st DBstore) SaveAlertInstance(ctx context.Context, cmd *models.SaveAlertInstanceCommand) error
- func (st DBstore) SaveAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
- func (st DBstore) SaveAlertmanagerConfigurationWithCallback(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd, ...) error
- func (st DBstore) SetProvenance(ctx context.Context, o models.Provisionable, org int64, p models.Provenance) error
- func (st DBstore) UpdateAdminConfiguration(cmd UpdateAdminConfigurationCmd) error
- func (st DBstore) UpdateAlertRules(ctx context.Context, rules []UpdateRule) error
- func (st *DBstore) UpdateAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
- type FakeAdminConfigStore
- func (f *FakeAdminConfigStore) DeleteAdminConfiguration(orgID int64) error
- func (f *FakeAdminConfigStore) GetAdminConfiguration(orgID int64) (*models.AdminConfiguration, error)
- func (f *FakeAdminConfigStore) GetAdminConfigurations() ([]*models.AdminConfiguration, error)
- func (f *FakeAdminConfigStore) UpdateAdminConfiguration(cmd UpdateAdminConfigurationCmd) error
- type FakeAnnotationsRepo
- func (repo *FakeAnnotationsRepo) Delete(_ context.Context, params *annotations.DeleteParams) error
- func (repo *FakeAnnotationsRepo) Find(_ context.Context, query *annotations.ItemQuery) ([]*annotations.ItemDTO, error)
- func (repo *FakeAnnotationsRepo) FindTags(_ context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error)
- func (repo *FakeAnnotationsRepo) Len() int
- func (repo *FakeAnnotationsRepo) Save(item *annotations.Item) error
- func (repo *FakeAnnotationsRepo) Update(_ context.Context, item *annotations.Item) error
- type FakeExternalAlertmanager
- func (am *FakeExternalAlertmanager) AlertNamesCompare(expected []string) bool
- func (am *FakeExternalAlertmanager) Alerts() amv2.PostableAlerts
- func (am *FakeExternalAlertmanager) AlertsCount() int
- func (am *FakeExternalAlertmanager) Close()
- func (am *FakeExternalAlertmanager) Handler() func(w http.ResponseWriter, r *http.Request)
- func (am *FakeExternalAlertmanager) URL() string
- type FakeInstanceStore
- func (f *FakeInstanceStore) DeleteAlertInstance(_ context.Context, _ int64, _, _ string) error
- func (f *FakeInstanceStore) FetchOrgIds(_ context.Context) ([]int64, error)
- func (f *FakeInstanceStore) GetAlertInstance(_ context.Context, q *models.GetAlertInstanceQuery) error
- func (f *FakeInstanceStore) ListAlertInstances(_ context.Context, q *models.ListAlertInstancesQuery) error
- func (f *FakeInstanceStore) SaveAlertInstance(_ context.Context, q *models.SaveAlertInstanceCommand) error
- type FakeRuleStore
- func (f *FakeRuleStore) DeleteAlertInstancesByRuleUID(_ context.Context, _ int64, _ string) error
- func (f *FakeRuleStore) DeleteAlertRulesByUID(_ context.Context, orgID int64, UIDs ...string) error
- func (f *FakeRuleStore) GetAlertRuleByUID(_ context.Context, q *models.GetAlertRuleByUIDQuery) error
- func (f *FakeRuleStore) GetAlertRulesForScheduling(_ context.Context, q *models.ListAlertRulesQuery) error
- func (f *FakeRuleStore) GetNamespaceByTitle(_ context.Context, title string, orgID int64, _ *models2.SignedInUser, _ bool) (*models2.Folder, error)
- func (f *FakeRuleStore) GetRecordedCommands(predicate func(cmd interface{}) (interface{}, bool)) []interface{}
- func (f *FakeRuleStore) GetRuleGroups(_ context.Context, q *models.ListRuleGroupsQuery) error
- func (f *FakeRuleStore) GetUserVisibleNamespaces(_ context.Context, orgID int64, _ *models2.SignedInUser) (map[string]*models2.Folder, error)
- func (f *FakeRuleStore) InTransaction(ctx context.Context, fn func(c context.Context) error) error
- func (f *FakeRuleStore) InsertAlertRules(_ context.Context, q []models.AlertRule) error
- func (f *FakeRuleStore) ListAlertRules(_ context.Context, q *models.ListAlertRulesQuery) error
- func (f *FakeRuleStore) PutRule(_ context.Context, rules ...*models.AlertRule)
- func (f *FakeRuleStore) UpdateAlertRules(_ context.Context, q []UpdateRule) error
- type GenericRecordedQuery
- type InstanceStore
- type OrgStore
- type RuleStore
- type SaveCallback
- type UpdateAdminConfigurationCmd
- type UpdateRule
- type UpdateRuleGroupCmd
Constants ¶
const AlertDefinitionMaxTitleLength = 190
AlertDefinitionMaxTitleLength is the maximum length of the alert definition title
const AlertRuleMaxRuleGroupNameLength = 190
AlertRuleMaxRuleGroupNameLength is the maximum length of the alert rule group name
const AlertRuleMaxTitleLength = 190
AlertRuleMaxTitleLength is the maximum length of the alert rule title
Variables ¶
var ( // ErrNoAlertmanagerConfiguration is an error for when no alertmanager configuration is found. ErrNoAlertmanagerConfiguration = fmt.Errorf("could not find an Alertmanager configuration") // ErrVersionLockedObjectNotFound is returned when an object is not // found using the current hash. ErrVersionLockedObjectNotFound = fmt.Errorf("could not find object using provided id and hash") )
var ( // ErrNoAdminConfiguration is an error for when no admin configuration is found. ErrNoAdminConfiguration = fmt.Errorf("no admin configuration available") )
var GenerateNewAlertRuleUID = func(sess *sqlstore.DBSession, orgID int64, ruleTitle string) (string, error) { for i := 0; i < 3; i++ { uid := util.GenerateShortUID() exists, err := sess.Where("org_id=? AND uid=?", orgID, uid).Get(&ngmodels.AlertRule{}) if err != nil { return "", err } if !exists { return uid, nil } } return "", ngmodels.ErrAlertRuleFailedGenerateUniqueUID }
GenerateNewAlertRuleUID generates a unique UID for a rule. This is set as a variable so that the tests can override it. The ruleTitle is only used by the mocked functions.
var TimeNow = time.Now
TimeNow makes it possible to test usage of time
Functions ¶
This section is empty.
Types ¶
type AdminConfigurationStore ¶
type AdminConfigurationStore interface { GetAdminConfiguration(orgID int64) (*ngmodels.AdminConfiguration, error) GetAdminConfigurations() ([]*ngmodels.AdminConfiguration, error) DeleteAdminConfiguration(orgID int64) error UpdateAdminConfiguration(UpdateAdminConfigurationCmd) error }
type AlertingStore ¶
type AlertingStore interface { GetLatestAlertmanagerConfiguration(ctx context.Context, query *models.GetLatestAlertmanagerConfigurationQuery) error GetAllLatestAlertmanagerConfiguration(ctx context.Context) ([]*models.AlertConfiguration, error) SaveAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error SaveAlertmanagerConfigurationWithCallback(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd, callback SaveCallback) error UpdateAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error }
AlertingStore is the database interface used by the Alertmanager service.
type DBstore ¶
type DBstore struct { // the base scheduler tick rate; it's used for validating definition interval BaseInterval time.Duration // default alert definiiton interval DefaultInterval time.Duration SQLStore *sqlstore.SQLStore Logger log.Logger FolderService dashboards.FolderService AccessControl accesscontrol.AccessControl }
DBstore stores the alert definitions and instances in the database.
func (DBstore) DeleteAdminConfiguration ¶
func (DBstore) DeleteAlertInstance ¶
func (DBstore) DeleteAlertInstancesByRuleUID ¶
func (st DBstore) DeleteAlertInstancesByRuleUID(ctx context.Context, orgID int64, ruleUID string) error
DeleteAlertInstanceByRuleUID is a handler for deleting alert instances by alert rule UID when a rule has been updated
func (DBstore) DeleteAlertRulesByUID ¶
DeleteAlertRulesByUID is a handler for deleting an alert rule.
func (DBstore) DeleteProvenance ¶
DeleteProvenance deletes the provenance record from the table
func (*DBstore) GetAdminConfiguration ¶
func (st *DBstore) GetAdminConfiguration(orgID int64) (*ngmodels.AdminConfiguration, error)
func (DBstore) GetAdminConfigurations ¶
func (st DBstore) GetAdminConfigurations() ([]*ngmodels.AdminConfiguration, error)
func (DBstore) GetAlertInstance ¶
GetAlertInstance is a handler for retrieving an alert instance based on OrgId, AlertDefintionID, and the hash of the labels.
func (DBstore) GetAlertRuleByUID ¶
func (st DBstore) GetAlertRuleByUID(ctx context.Context, query *ngmodels.GetAlertRuleByUIDQuery) error
GetAlertRuleByUID is a handler for retrieving an alert rule from that database by its UID and organisation ID. It returns ngmodels.ErrAlertRuleNotFound if no alert rule is found for the provided ID.
func (DBstore) GetAlertRulesForScheduling ¶
func (st DBstore) GetAlertRulesForScheduling(ctx context.Context, query *ngmodels.ListAlertRulesQuery) error
GetAlertRulesForScheduling returns alert rule info (identifier, interval, version state) that is useful for it's scheduling.
func (*DBstore) GetAllLatestAlertmanagerConfiguration ¶
func (st *DBstore) GetAllLatestAlertmanagerConfiguration(ctx context.Context) ([]*models.AlertConfiguration, error)
GetAllLatestAlertmanagerConfiguration returns the latest configuration of every organization
func (*DBstore) GetLatestAlertmanagerConfiguration ¶
func (st *DBstore) GetLatestAlertmanagerConfiguration(ctx context.Context, query *models.GetLatestAlertmanagerConfigurationQuery) error
GetLatestAlertmanagerConfiguration returns the lastest version of the alertmanager configuration. It returns ErrNoAlertmanagerConfiguration if no configuration is found.
func (DBstore) GetNamespaceByTitle ¶
func (st DBstore) GetNamespaceByTitle(ctx context.Context, namespace string, orgID int64, user *models.SignedInUser, withCanSave bool) (*models.Folder, error)
GetNamespaceByTitle is a handler for retrieving a namespace by its title. Alerting rules follow a Grafana folder-like structure which we call namespaces.
func (DBstore) GetProvenance ¶
func (st DBstore) GetProvenance(ctx context.Context, o models.Provisionable, org int64) (models.Provenance, error)
GetProvenance gets the provenance status for a provisionable object.
func (DBstore) GetProvenances ¶
func (st DBstore) GetProvenances(ctx context.Context, org int64, resourceType string) (map[string]models.Provenance, error)
GetProvenance gets the provenance status for a provisionable object.
func (DBstore) GetRuleGroups ¶
func (DBstore) GetUserVisibleNamespaces ¶
func (st DBstore) GetUserVisibleNamespaces(ctx context.Context, orgID int64, user *models.SignedInUser) (map[string]*models.Folder, error)
GetNamespaces returns the folders that are visible to the user and have at least one alert in it
func (*DBstore) InTransaction ¶
func (DBstore) InsertAlertRules ¶
InsertAlertRules is a handler for creating/updating alert rules.
func (DBstore) ListAlertInstances ¶
func (st DBstore) ListAlertInstances(ctx context.Context, cmd *models.ListAlertInstancesQuery) error
ListAlertInstances is a handler for retrieving alert instances within specific organisation based on various filters.
func (DBstore) ListAlertRules ¶
GetOrgAlertRules is a handler for retrieving alert rules of specific organisation.
func (DBstore) SaveAlertInstance ¶
func (st DBstore) SaveAlertInstance(ctx context.Context, cmd *models.SaveAlertInstanceCommand) error
SaveAlertInstance is a handler for saving a new alert instance.
func (DBstore) SaveAlertmanagerConfiguration ¶
func (st DBstore) SaveAlertmanagerConfiguration(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd) error
SaveAlertmanagerConfiguration creates an alertmanager configuration.
func (DBstore) SaveAlertmanagerConfigurationWithCallback ¶
func (st DBstore) SaveAlertmanagerConfigurationWithCallback(ctx context.Context, cmd *models.SaveAlertmanagerConfigurationCmd, callback SaveCallback) error
SaveAlertmanagerConfigurationWithCallback creates an alertmanager configuration version and then executes a callback. If the callback results in error it rolls back the transaction.
func (DBstore) SetProvenance ¶
func (st DBstore) SetProvenance(ctx context.Context, o models.Provisionable, org int64, p models.Provenance) error
SetProvenance changes the provenance status for a provisionable object.
func (DBstore) UpdateAdminConfiguration ¶
func (st DBstore) UpdateAdminConfiguration(cmd UpdateAdminConfigurationCmd) error
func (DBstore) UpdateAlertRules ¶
func (st DBstore) UpdateAlertRules(ctx context.Context, rules []UpdateRule) error
UpdateAlertRules is a handler for creating/updating alert rules.
func (*DBstore) UpdateAlertmanagerConfiguration ¶
type FakeAdminConfigStore ¶
type FakeAdminConfigStore struct { Configs map[int64]*models.AdminConfiguration // contains filtered or unexported fields }
func NewFakeAdminConfigStore ¶
func NewFakeAdminConfigStore(t *testing.T) *FakeAdminConfigStore
func (*FakeAdminConfigStore) DeleteAdminConfiguration ¶
func (f *FakeAdminConfigStore) DeleteAdminConfiguration(orgID int64) error
func (*FakeAdminConfigStore) GetAdminConfiguration ¶
func (f *FakeAdminConfigStore) GetAdminConfiguration(orgID int64) (*models.AdminConfiguration, error)
func (*FakeAdminConfigStore) GetAdminConfigurations ¶
func (f *FakeAdminConfigStore) GetAdminConfigurations() ([]*models.AdminConfiguration, error)
func (*FakeAdminConfigStore) UpdateAdminConfiguration ¶
func (f *FakeAdminConfigStore) UpdateAdminConfiguration(cmd UpdateAdminConfigurationCmd) error
type FakeAnnotationsRepo ¶
type FakeAnnotationsRepo struct { Items []*annotations.Item // contains filtered or unexported fields }
func NewFakeAnnotationsRepo ¶
func NewFakeAnnotationsRepo() *FakeAnnotationsRepo
func (*FakeAnnotationsRepo) Delete ¶
func (repo *FakeAnnotationsRepo) Delete(_ context.Context, params *annotations.DeleteParams) error
func (*FakeAnnotationsRepo) Find ¶
func (repo *FakeAnnotationsRepo) Find(_ context.Context, query *annotations.ItemQuery) ([]*annotations.ItemDTO, error)
func (*FakeAnnotationsRepo) FindTags ¶
func (repo *FakeAnnotationsRepo) FindTags(_ context.Context, query *annotations.TagsQuery) (annotations.FindTagsResult, error)
func (*FakeAnnotationsRepo) Len ¶
func (repo *FakeAnnotationsRepo) Len() int
func (*FakeAnnotationsRepo) Save ¶
func (repo *FakeAnnotationsRepo) Save(item *annotations.Item) error
func (*FakeAnnotationsRepo) Update ¶
func (repo *FakeAnnotationsRepo) Update(_ context.Context, item *annotations.Item) error
type FakeExternalAlertmanager ¶
type FakeExternalAlertmanager struct { Server *httptest.Server // contains filtered or unexported fields }
func NewFakeExternalAlertmanager ¶
func NewFakeExternalAlertmanager(t *testing.T) *FakeExternalAlertmanager
func (*FakeExternalAlertmanager) AlertNamesCompare ¶
func (am *FakeExternalAlertmanager) AlertNamesCompare(expected []string) bool
func (*FakeExternalAlertmanager) Alerts ¶
func (am *FakeExternalAlertmanager) Alerts() amv2.PostableAlerts
func (*FakeExternalAlertmanager) AlertsCount ¶
func (am *FakeExternalAlertmanager) AlertsCount() int
func (*FakeExternalAlertmanager) Close ¶
func (am *FakeExternalAlertmanager) Close()
func (*FakeExternalAlertmanager) Handler ¶
func (am *FakeExternalAlertmanager) Handler() func(w http.ResponseWriter, r *http.Request)
func (*FakeExternalAlertmanager) URL ¶
func (am *FakeExternalAlertmanager) URL() string
type FakeInstanceStore ¶
type FakeInstanceStore struct { RecordedOps []interface{} // contains filtered or unexported fields }
func (*FakeInstanceStore) DeleteAlertInstance ¶
func (*FakeInstanceStore) FetchOrgIds ¶
func (f *FakeInstanceStore) FetchOrgIds(_ context.Context) ([]int64, error)
func (*FakeInstanceStore) GetAlertInstance ¶
func (f *FakeInstanceStore) GetAlertInstance(_ context.Context, q *models.GetAlertInstanceQuery) error
func (*FakeInstanceStore) ListAlertInstances ¶
func (f *FakeInstanceStore) ListAlertInstances(_ context.Context, q *models.ListAlertInstancesQuery) error
func (*FakeInstanceStore) SaveAlertInstance ¶
func (f *FakeInstanceStore) SaveAlertInstance(_ context.Context, q *models.SaveAlertInstanceCommand) error
type FakeRuleStore ¶
type FakeRuleStore struct { // OrgID -> RuleGroup -> Namespace -> Rules Rules map[int64][]*models.AlertRule Hook func(cmd interface{}) error // use Hook if you need to intercept some query and return an error RecordedOps []interface{} Folders map[int64][]*models2.Folder // contains filtered or unexported fields }
FakeRuleStore mocks the RuleStore of the scheduler.
func NewFakeRuleStore ¶
func NewFakeRuleStore(t *testing.T) *FakeRuleStore
func (*FakeRuleStore) DeleteAlertInstancesByRuleUID ¶
func (*FakeRuleStore) DeleteAlertRulesByUID ¶
func (*FakeRuleStore) GetAlertRuleByUID ¶
func (f *FakeRuleStore) GetAlertRuleByUID(_ context.Context, q *models.GetAlertRuleByUIDQuery) error
func (*FakeRuleStore) GetAlertRulesForScheduling ¶
func (f *FakeRuleStore) GetAlertRulesForScheduling(_ context.Context, q *models.ListAlertRulesQuery) error
For now, we're not implementing namespace filtering.
func (*FakeRuleStore) GetNamespaceByTitle ¶
func (*FakeRuleStore) GetRecordedCommands ¶
func (f *FakeRuleStore) GetRecordedCommands(predicate func(cmd interface{}) (interface{}, bool)) []interface{}
GetRecordedCommands filters recorded commands using predicate function. Returns the subset of the recorded commands that meet the predicate
func (*FakeRuleStore) GetRuleGroups ¶
func (f *FakeRuleStore) GetRuleGroups(_ context.Context, q *models.ListRuleGroupsQuery) error
func (*FakeRuleStore) GetUserVisibleNamespaces ¶
func (f *FakeRuleStore) GetUserVisibleNamespaces(_ context.Context, orgID int64, _ *models2.SignedInUser) (map[string]*models2.Folder, error)
func (*FakeRuleStore) InTransaction ¶
func (*FakeRuleStore) InsertAlertRules ¶
func (*FakeRuleStore) ListAlertRules ¶
func (f *FakeRuleStore) ListAlertRules(_ context.Context, q *models.ListAlertRulesQuery) error
func (*FakeRuleStore) PutRule ¶
func (f *FakeRuleStore) PutRule(_ context.Context, rules ...*models.AlertRule)
PutRule puts the rule in the Rules map. If there are existing rule in the same namespace, they will be overwritten
func (*FakeRuleStore) UpdateAlertRules ¶
func (f *FakeRuleStore) UpdateAlertRules(_ context.Context, q []UpdateRule) error
type GenericRecordedQuery ¶
type GenericRecordedQuery struct { Name string Params []interface{} }
type InstanceStore ¶
type InstanceStore interface { GetAlertInstance(ctx context.Context, cmd *models.GetAlertInstanceQuery) error ListAlertInstances(ctx context.Context, cmd *models.ListAlertInstancesQuery) error SaveAlertInstance(ctx context.Context, cmd *models.SaveAlertInstanceCommand) error FetchOrgIds(ctx context.Context) ([]int64, error) DeleteAlertInstance(ctx context.Context, orgID int64, ruleUID, labelsHash string) error }
type RuleStore ¶
type RuleStore interface { DeleteAlertRulesByUID(ctx context.Context, orgID int64, ruleUID ...string) error DeleteAlertInstancesByRuleUID(ctx context.Context, orgID int64, ruleUID string) error GetAlertRuleByUID(ctx context.Context, query *ngmodels.GetAlertRuleByUIDQuery) error GetAlertRulesForScheduling(ctx context.Context, query *ngmodels.ListAlertRulesQuery) error ListAlertRules(ctx context.Context, query *ngmodels.ListAlertRulesQuery) error // GetRuleGroups returns the unique rule groups across all organizations. GetRuleGroups(ctx context.Context, query *ngmodels.ListRuleGroupsQuery) error GetUserVisibleNamespaces(context.Context, int64, *models.SignedInUser) (map[string]*models.Folder, error) GetNamespaceByTitle(context.Context, string, int64, *models.SignedInUser, bool) (*models.Folder, error) InsertAlertRules(ctx context.Context, rule []ngmodels.AlertRule) error UpdateAlertRules(ctx context.Context, rule []UpdateRule) error }
RuleStore is the interface for persisting alert rules and instances
type SaveCallback ¶
type SaveCallback func() error
type UpdateAdminConfigurationCmd ¶
type UpdateAdminConfigurationCmd struct {
AdminConfiguration *ngmodels.AdminConfiguration
}
type UpdateRuleGroupCmd ¶
type UpdateRuleGroupCmd struct { OrgID int64 NamespaceUID string RuleGroupConfig apimodels.PostableRuleGroupConfig }