Documentation ¶
Index ¶
- Constants
- type Client
- func (l *Client) DeleteNamespace(_ context.Context, _, _ string) error
- func (l *Client) DeleteRuleGroup(_ context.Context, _, _ string, _ string) error
- func (l *Client) GetRuleGroup(_ context.Context, _, _, _ string) (*rulespb.RuleGroupDesc, error)
- func (l *Client) ListAllRuleGroups(ctx context.Context) (map[string]rulespb.RuleGroupList, error)
- func (l *Client) ListAllUsers(_ context.Context) ([]string, error)
- func (l *Client) ListRuleGroupsForUserAndNamespace(ctx context.Context, userID string, namespace string) (rulespb.RuleGroupList, error)
- func (l *Client) LoadRuleGroups(_ context.Context, _ map[string]rulespb.RuleGroupList) error
- func (l *Client) SetRuleGroup(_ context.Context, _, _ string, _ *rulespb.RuleGroupDesc) error
- type Config
Constants ¶
View Source
const (
Name = "local"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client expects to load already existing rules located at:
cfg.Directory / userID / namespace
func NewLocalRulesClient ¶
func NewLocalRulesClient(cfg Config, loader promRules.GroupLoader) (*Client, error)
func (*Client) DeleteNamespace ¶
DeleteNamespace implements RulerStore
func (*Client) DeleteRuleGroup ¶
DeleteRuleGroup implements RuleStore
func (*Client) GetRuleGroup ¶
GetRuleGroup implements RuleStore
func (*Client) ListAllRuleGroups ¶
ListAllRuleGroups implements rules.RuleStore. This method also loads the rules.
func (*Client) ListRuleGroupsForUserAndNamespace ¶
func (l *Client) ListRuleGroupsForUserAndNamespace(ctx context.Context, userID string, namespace string) (rulespb.RuleGroupList, error)
ListRuleGroupsForUserAndNamespace implements rules.RuleStore. This method also loads the rules.
func (*Client) LoadRuleGroups ¶
func (*Client) SetRuleGroup ¶
SetRuleGroup implements RuleStore
Click to show internal directories.
Click to hide internal directories.