Documentation ¶
Index ¶
- Variables
- func GetBlockMeta(blockDir string) (block.Meta, error)
- func UserAgent() string
- type Config
- type MimirClient
- func (c *MimirClient) Backfill(ctx context.Context, blocks []string, sleepTime time.Duration) error
- func (r *MimirClient) CreateAlertmanagerConfig(ctx context.Context, cfg string, templates map[string]string) error
- func (r *MimirClient) CreateRuleGroup(ctx context.Context, namespace string, rg rwrulefmt.RuleGroup) error
- func (r *MimirClient) DeleteAlermanagerConfig(ctx context.Context) error
- func (r *MimirClient) DeleteNamespace(ctx context.Context, namespace string) error
- func (r *MimirClient) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error
- func (r *MimirClient) GetAlertmanagerConfig(ctx context.Context) (string, map[string]string, error)
- func (r *MimirClient) GetRuleGroup(ctx context.Context, namespace, groupName string) (*rwrulefmt.RuleGroup, error)
- func (r *MimirClient) ListRules(ctx context.Context, namespace string) (map[string][]rwrulefmt.RuleGroup, error)
- func (r *MimirClient) Query(ctx context.Context, query string) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrResourceNotFound = errors.New("requested resource not found")
)
Functions ¶
func GetBlockMeta ¶
GetBlockMeta reads meta.json file, and adds (or replaces) thanos.files section with list of local files from the local block.
Types ¶
type Config ¶
type Config struct { User string `yaml:"user"` Key string `yaml:"key"` Address string `yaml:"address"` ID string `yaml:"id"` TLS tls.ClientConfig UseLegacyRoutes bool `yaml:"use_legacy_routes"` MimirHTTPPrefix string `yaml:"mimir_http_prefix"` AuthToken string `yaml:"auth_token"` ExtraHeaders map[string]string `yaml:"extra_headers"` }
Config is used to configure a MimirClient.
type MimirClient ¶
MimirClient is a client to the Mimir API.
func (*MimirClient) CreateAlertmanagerConfig ¶
func (r *MimirClient) CreateAlertmanagerConfig(ctx context.Context, cfg string, templates map[string]string) error
CreateAlertmanagerConfig creates a new alertmanager config
func (*MimirClient) CreateRuleGroup ¶
func (r *MimirClient) CreateRuleGroup(ctx context.Context, namespace string, rg rwrulefmt.RuleGroup) error
CreateRuleGroup creates a new rule group
func (*MimirClient) DeleteAlermanagerConfig ¶
func (r *MimirClient) DeleteAlermanagerConfig(ctx context.Context) error
DeleteAlermanagerConfig deletes the users alertmanagerconfig
func (*MimirClient) DeleteNamespace ¶
func (r *MimirClient) DeleteNamespace(ctx context.Context, namespace string) error
DeleteNamespace delete all the rule groups in a namespace including the namespace itself
func (*MimirClient) DeleteRuleGroup ¶
func (r *MimirClient) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error
DeleteRuleGroup deletes a rule group
func (*MimirClient) GetAlertmanagerConfig ¶
GetAlertmanagerConfig retrieves a Mimir cluster's Alertmanager config.
func (*MimirClient) GetRuleGroup ¶
func (r *MimirClient) GetRuleGroup(ctx context.Context, namespace, groupName string) (*rwrulefmt.RuleGroup, error)
GetRuleGroup retrieves a rule group
Click to show internal directories.
Click to hide internal directories.