Versions in this module Expand all Collapse all v0 v0.4.1 Jul 19, 2022 Changes in this version + func FromContext(ctx context.Context) string + func NewContext(ctx context.Context, tenantId string) context.Context + type AlertManagerConfig struct + Receivers []ReceiverConfig + type Client struct + func NewClient(cfg Config, opts ...ClientOption) (*Client, error) + func (c *Client) CreateAlertmanagerConfig(amConfigs AlertManagerConfig, tenantID string) error + func (c *Client) CreateRuleGroup(ctx context.Context, namespace string, rg rwrulefmt.RuleGroup) error + func (c *Client) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error + func (c *Client) GetRuleGroup(ctx context.Context, namespace, groupName string) (*rwrulefmt.RuleGroup, error) + func (c *Client) ListRules(ctx context.Context, namespace string) (map[string][]rwrulefmt.RuleGroup, error) + type ClientOption func(*Client) + func WithCortexClient(cc CortexCaller) ClientOption + func WithHelperTemplate(configYaml, helperTemplate string) ClientOption + type Config struct + Address string + PrometheusAlertManagerConfigYaml string + PrometheusAlertManagerHelperTemplate string + type CortexCaller interface + CreateAlertmanagerConfig func(ctx context.Context, cfg string, templates map[string]string) error + CreateRuleGroup func(ctx context.Context, namespace string, rg rwrulefmt.RuleGroup) error + DeleteRuleGroup func(ctx context.Context, namespace, groupName string) error + GetRuleGroup func(ctx context.Context, namespace, groupName string) (*rwrulefmt.RuleGroup, error) + ListRules func(ctx context.Context, namespace string) (map[string][]rwrulefmt.RuleGroup, error) + type ReceiverConfig struct + Configuration map[string]string + Match map[string]string + Receiver string + Type string