Documentation ¶
Index ¶
- type Alertmanager
- type AlertmanagerConfig
- type Config
- type Mimir
- func (mc *Mimir) CreateGrafanaAlertmanagerConfig(ctx context.Context, cfg *apimodels.PostableUserConfig, hash string, ...) error
- func (mc *Mimir) CreateGrafanaAlertmanagerState(ctx context.Context, state string) error
- func (mc *Mimir) DeleteGrafanaAlertmanagerConfig(ctx context.Context) error
- func (mc *Mimir) DeleteGrafanaAlertmanagerState(ctx context.Context) error
- func (mc *Mimir) GetGrafanaAlertmanagerConfig(ctx context.Context) (*UserGrafanaConfig, error)
- func (mc *Mimir) GetGrafanaAlertmanagerState(ctx context.Context) (*UserGrafanaState, error)
- func (mc *Mimir) ShouldPromoteConfig() bool
- type MimirAuthRoundTripper
- type MimirClient
- type UserGrafanaConfig
- type UserGrafanaState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alertmanager ¶
type Alertmanager struct { *amclient.AlertmanagerAPI // contains filtered or unexported fields }
func NewAlertmanager ¶
func NewAlertmanager(cfg *AlertmanagerConfig, metrics *metrics.RemoteAlertmanager) (*Alertmanager, error)
func (*Alertmanager) GetAuthedClient ¶
func (am *Alertmanager) GetAuthedClient() client.Requester
GetAuthedClient returns a client.Requester that includes a configured MimirAuthRoundTripper. Requests using this client are fully authenticated.
func (*Alertmanager) IsReadyWithBackoff ¶
func (am *Alertmanager) IsReadyWithBackoff(ctx context.Context) (bool, error)
IsReadyWithBackoff executes a readiness check against the `/-/ready` Alertmanager endpoint. If it takes more than 10s to get a response back - we abort the check.
type AlertmanagerConfig ¶
type Mimir ¶
type Mimir struct {
// contains filtered or unexported fields
}
func (*Mimir) CreateGrafanaAlertmanagerConfig ¶
func (*Mimir) CreateGrafanaAlertmanagerState ¶
func (*Mimir) DeleteGrafanaAlertmanagerConfig ¶
func (*Mimir) DeleteGrafanaAlertmanagerState ¶
func (*Mimir) GetGrafanaAlertmanagerConfig ¶
func (mc *Mimir) GetGrafanaAlertmanagerConfig(ctx context.Context) (*UserGrafanaConfig, error)
func (*Mimir) GetGrafanaAlertmanagerState ¶
func (mc *Mimir) GetGrafanaAlertmanagerState(ctx context.Context) (*UserGrafanaState, error)
func (*Mimir) ShouldPromoteConfig ¶
type MimirAuthRoundTripper ¶
type MimirAuthRoundTripper struct { TenantID string Password string Next http.RoundTripper }
type MimirClient ¶
type MimirClient interface { GetGrafanaAlertmanagerState(ctx context.Context) (*UserGrafanaState, error) CreateGrafanaAlertmanagerState(ctx context.Context, state string) error DeleteGrafanaAlertmanagerState(ctx context.Context) error GetGrafanaAlertmanagerConfig(ctx context.Context) (*UserGrafanaConfig, error) CreateGrafanaAlertmanagerConfig(ctx context.Context, configuration *apimodels.PostableUserConfig, hash string, createdAt int64, isDefault bool) error DeleteGrafanaAlertmanagerConfig(ctx context.Context) error ShouldPromoteConfig() bool }
MimirClient contains all the methods to query the migration critical endpoints of Mimir instance, it's an interface to allow multiple implementations.
type UserGrafanaConfig ¶
type UserGrafanaState ¶
type UserGrafanaState struct {
State string `json:"state"`
}
Click to show internal directories.
Click to hide internal directories.