AddContext is like Add but includes a context. If the context expires before HTTP request is complete, an error is returned.
(ctx context.Context)
| 144 | // |
| 145 | // If the context expires before HTTP request is complete, an error is returned. |
| 146 | func (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 |