Documentation ¶
Index ¶
- Variables
- type Config
- type Interface
- type MimirClient
- func (r *MimirClient) CreateRuleGroup(ctx context.Context, namespace string, rg rulefmt.RuleGroup) error
- func (r *MimirClient) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error
- func (r *MimirClient) ListRules(ctx context.Context, namespace string) (map[string][]rulefmt.RuleGroup, error)
- type RemoteWriteConfig
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 { ID string Address string UseLegacyRoutes bool HTTPClientConfig config.HTTPClientConfig PrometheusHTTPPrefix string }
Config is used to configure a MimirClient.
type MimirClient ¶
type MimirClient struct {
// contains filtered or unexported fields
}
MimirClient is a client to the Mimir API.
func New ¶
func New(logger log.Logger, cfg Config, timingHistogram *prometheus.HistogramVec) (*MimirClient, error)
New returns a new MimirClient.
func (*MimirClient) CreateRuleGroup ¶
func (r *MimirClient) CreateRuleGroup(ctx context.Context, namespace string, rg rulefmt.RuleGroup) error
CreateRuleGroup creates a new rule group
func (*MimirClient) DeleteRuleGroup ¶
func (r *MimirClient) DeleteRuleGroup(ctx context.Context, namespace, groupName string) error
DeleteRuleGroup deletes a rule group
type RemoteWriteConfig ¶
type RemoteWriteConfig struct {
URL string `json:"url,omitempty"`
}
RemoteWriteConfig is used to specify a remote write endpoint
Click to show internal directories.
Click to hide internal directories.