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

Method Config

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

Source from the content-addressed store, hash-verified

927}
928
929func (h *httpAPI) Config(ctx context.Context) (ConfigResult, error) {
930 u := h.client.URL(epConfig, nil)
931
932 req, err := http.NewRequest(http.MethodGet, u.String(), nil)
933 if err != nil {
934 return ConfigResult{}, err
935 }
936
937 _, body, _, err := h.client.Do(ctx, req)
938 if err != nil {
939 return ConfigResult{}, err
940 }
941
942 var res ConfigResult
943 err = json.Unmarshal(body, &res)
944 return res, err
945}
946
947func (h *httpAPI) DeleteSeries(ctx context.Context, matches []string, startTime, endTime time.Time) error {
948 u := h.client.URL(epDeleteSeries, nil)

Callers 1

TestAPIsFunction · 0.95

Calls 3

URLMethod · 0.65
DoMethod · 0.65
StringMethod · 0.45

Tested by 1

TestAPIsFunction · 0.76