MCPcopy
hub / github.com/prometheus/client_golang / AlertManagers

Method AlertManagers

api/prometheus/v1/api.go:899–915  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

897}
898
899func (h *httpAPI) AlertManagers(ctx context.Context) (AlertManagersResult, error) {
900 u := h.client.URL(epAlertManagers, nil)
901
902 req, err := http.NewRequest(http.MethodGet, u.String(), nil)
903 if err != nil {
904 return AlertManagersResult{}, err
905 }
906
907 _, body, _, err := h.client.Do(ctx, req)
908 if err != nil {
909 return AlertManagersResult{}, err
910 }
911
912 var res AlertManagersResult
913 err = json.Unmarshal(body, &res)
914 return res, err
915}
916
917func (h *httpAPI) CleanTombstones(ctx context.Context) error {
918 u := h.client.URL(epCleanTombstones, nil)

Callers 1

TestAPIsFunction · 0.95

Calls 3

URLMethod · 0.65
DoMethod · 0.65
StringMethod · 0.45

Tested by 1

TestAPIsFunction · 0.76