Documentation ¶
Index ¶
- Variables
- type Config
- type CortexClient
- func (r *CortexClient) CreateAlertmanagerConfig(ctx context.Context, cfg string, templates map[string]string) error
- func (r *CortexClient) CreateRuleGroup(ctx context.Context, namespace string, rg rulefmt.RuleGroup) error
- func (r *CortexClient) DeleteAlermanagerConfig(ctx context.Context) error
- func (r *CortexClient) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error
- func (r *CortexClient) GetAlertmanagerConfig(ctx context.Context) (string, map[string]string, error)
- func (r *CortexClient) GetRuleGroup(ctx context.Context, namespace, groupName string) (*rulefmt.RuleGroup, error)
- func (r *CortexClient) ListRules(ctx context.Context, namespace string) (map[string][]rulefmt.RuleGroup, error)
- func (r *CortexClient) Query(ctx context.Context, query string) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoConfig = errors.New("No config exists for this user") ErrResourceNotFound = errors.New("requested resource not found") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Key string `yaml:"key"` Address string `yaml:"address"` ID string `yaml:"id"` TLS tls.ClientConfig }
Config is used to configure a Ruler Client
type CortexClient ¶
type CortexClient struct {
// contains filtered or unexported fields
}
CortexClient is used to get and load rules into a cortex ruler
func (*CortexClient) CreateAlertmanagerConfig ¶
func (r *CortexClient) CreateAlertmanagerConfig(ctx context.Context, cfg string, templates map[string]string) error
CreateAlertmanagerConfig creates a new alertmanager config
func (*CortexClient) CreateRuleGroup ¶
func (r *CortexClient) CreateRuleGroup(ctx context.Context, namespace string, rg rulefmt.RuleGroup) error
CreateRuleGroup creates a new rule group
func (*CortexClient) DeleteAlermanagerConfig ¶
func (r *CortexClient) DeleteAlermanagerConfig(ctx context.Context) error
DeleteAlermanagerConfig deletes the users alertmanagerconfig
func (*CortexClient) DeleteRuleGroup ¶
func (r *CortexClient) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error
DeleteRuleGroup creates a new rule group
func (*CortexClient) GetAlertmanagerConfig ¶
func (r *CortexClient) GetAlertmanagerConfig(ctx context.Context) (string, map[string]string, error)
GetAlertmanagerConfig retrieves a rule group
func (*CortexClient) GetRuleGroup ¶
func (r *CortexClient) GetRuleGroup(ctx context.Context, namespace, groupName string) (*rulefmt.RuleGroup, error)
GetRuleGroup retrieves a rule group
Click to show internal directories.
Click to hide internal directories.