local

package
v0.0.0-...-f8e07d0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 rulestore.LocalStoreConfig, loader promRules.GroupLoader) (*Client, error)

func (*Client) DeleteNamespace

func (l *Client) DeleteNamespace(_ context.Context, _, _ string) error

DeleteNamespace implements RulerStore

func (*Client) DeleteRuleGroup

func (l *Client) DeleteRuleGroup(_ context.Context, _, _, _ string) error

DeleteRuleGroup implements RuleStore

func (*Client) GetRuleGroup

func (l *Client) GetRuleGroup(ctx context.Context, userID string, namespace string, group string) (*rulespb.RuleGroupDesc, error)

GetRuleGroup implements RuleStore

func (*Client) ListAllUsers

func (l *Client) ListAllUsers(_ context.Context, _ ...rulestore.Option) ([]string, error)

func (*Client) ListRuleGroupsForUserAndNamespace

func (l *Client) ListRuleGroupsForUserAndNamespace(ctx context.Context, userID string, namespace string, _ ...rulestore.Option) (rulespb.RuleGroupList, error)

ListRuleGroupsForUserAndNamespace implements rules.RuleStore. This method also loads the rules.

func (*Client) LoadRuleGroups

func (l *Client) LoadRuleGroups(_ context.Context, _ map[string]rulespb.RuleGroupList) (rulespb.RuleGroupList, error)

func (*Client) SetRuleGroup

func (l *Client) SetRuleGroup(_ context.Context, _, _ string, _ *rulespb.RuleGroupDesc) error

SetRuleGroup implements RuleStore

Jump to

Keyboard shortcuts

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