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

Method AddContext

prometheus/push/push.go:146–148  ·  view source on GitHub ↗

AddContext is like Add but includes a context. If the context expires before HTTP request is complete, an error is returned.

(ctx context.Context)

Source from the content-addressed store, hash-verified

144//
145// If the context expires before HTTP request is complete, an error is returned.
146func (p *Pusher) AddContext(ctx context.Context) error {
147 return p.push(ctx, http.MethodPost)
148}
149
150// Gatherer adds a Gatherer to the Pusher, from which metrics will be gathered
151// to push them to the Pushgateway. The gathered metrics must not contain a job

Callers

nothing calls this directly

Calls 1

pushMethod · 0.95

Tested by

no test coverage detected