Documentation ¶
Index ¶
- Constants
- type BucketRuleStore
- func (b *BucketRuleStore) DeleteNamespace(ctx context.Context, userID string, namespace string) error
- func (b *BucketRuleStore) DeleteRuleGroup(ctx context.Context, userID string, namespace string, group string) error
- func (b *BucketRuleStore) GetRuleGroup(ctx context.Context, userID string, namespace string, group string) (*rulespb.RuleGroupDesc, error)
- func (b *BucketRuleStore) ListAllUsers(ctx context.Context, opts ...rulestore.Option) ([]string, error)
- func (b *BucketRuleStore) ListRuleGroupsForUserAndNamespace(ctx context.Context, userID string, namespace string, opts ...rulestore.Option) (rulespb.RuleGroupList, error)
- func (b *BucketRuleStore) LoadRuleGroups(ctx context.Context, groupsToLoad map[string]rulespb.RuleGroupList) (missing rulespb.RuleGroupList, err error)
- func (b *BucketRuleStore) SetRuleGroup(ctx context.Context, userID string, namespace string, ...) error
Constants ¶
View Source
const (
// RulesPrefix is the bucket prefix under which all tenants rule groups are stored.
RulesPrefix = "rules"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketRuleStore ¶
type BucketRuleStore struct {
// contains filtered or unexported fields
}
BucketRuleStore is used to support the RuleStore interface against an object storage backend. It is implemented using the Thanos objstore.Bucket interface
func NewBucketRuleStore ¶
func NewBucketRuleStore(bkt objstore.Bucket, cfgProvider bucket.TenantConfigProvider, logger log.Logger) *BucketRuleStore
func (*BucketRuleStore) DeleteNamespace ¶
func (b *BucketRuleStore) DeleteNamespace(ctx context.Context, userID string, namespace string) error
DeleteNamespace implements rules.RuleStore.
func (*BucketRuleStore) DeleteRuleGroup ¶
func (b *BucketRuleStore) DeleteRuleGroup(ctx context.Context, userID string, namespace string, group string) error
DeleteRuleGroup implements rules.RuleStore.
func (*BucketRuleStore) GetRuleGroup ¶
func (b *BucketRuleStore) GetRuleGroup(ctx context.Context, userID string, namespace string, group string) (*rulespb.RuleGroupDesc, error)
GetRuleGroup implements rules.RuleStore.
func (*BucketRuleStore) ListAllUsers ¶
func (b *BucketRuleStore) ListAllUsers(ctx context.Context, opts ...rulestore.Option) ([]string, error)
ListAllUsers implements rules.RuleStore.
func (*BucketRuleStore) ListRuleGroupsForUserAndNamespace ¶
func (b *BucketRuleStore) ListRuleGroupsForUserAndNamespace(ctx context.Context, userID string, namespace string, opts ...rulestore.Option) (rulespb.RuleGroupList, error)
ListRuleGroupsForUserAndNamespace implements rules.RuleStore.
func (*BucketRuleStore) LoadRuleGroups ¶
func (b *BucketRuleStore) LoadRuleGroups(ctx context.Context, groupsToLoad map[string]rulespb.RuleGroupList) (missing rulespb.RuleGroupList, err error)
LoadRuleGroups implements rules.RuleStore.
func (*BucketRuleStore) SetRuleGroup ¶
func (b *BucketRuleStore) SetRuleGroup(ctx context.Context, userID string, namespace string, group *rulespb.RuleGroupDesc) error
SetRuleGroup implements rules.RuleStore.
Click to show internal directories.
Click to hide internal directories.