push.go: document that PushOptions.WaitGroup can be used for waiting for background push workers to stop
This is a follow-up for c45a8b1b70
This commit is contained in:
parent
c45a8b1b70
commit
64b88f0e8f
3
push.go
3
push.go
@ -39,6 +39,7 @@ type PushOptions struct {
|
|||||||
// InitPushWithOptions sets up periodic push for globally registered metrics to the given pushURL with the given interval.
|
// InitPushWithOptions sets up periodic push for globally registered metrics to the given pushURL with the given interval.
|
||||||
//
|
//
|
||||||
// The periodic push is stopped when ctx is canceled.
|
// The periodic push is stopped when ctx is canceled.
|
||||||
|
// It is possible to wait until the background metrics push worker is stopped on a WaitGroup passed via opts.WaitGroup.
|
||||||
//
|
//
|
||||||
// If pushProcessMetrics is set to true, then 'process_*' and `go_*` metrics are also pushed to pushURL.
|
// If pushProcessMetrics is set to true, then 'process_*' and `go_*` metrics are also pushed to pushURL.
|
||||||
//
|
//
|
||||||
@ -116,6 +117,7 @@ func PushMetrics(ctx context.Context, pushURL string, pushProcessMetrics bool, o
|
|||||||
// InitPushWithOptions sets up periodic push for metrics from s to the given pushURL with the given interval.
|
// InitPushWithOptions sets up periodic push for metrics from s to the given pushURL with the given interval.
|
||||||
//
|
//
|
||||||
// The periodic push is stopped when the ctx is canceled.
|
// The periodic push is stopped when the ctx is canceled.
|
||||||
|
// It is possible to wait until the background metrics push worker is stopped on a WaitGroup passed via opts.WaitGroup.
|
||||||
//
|
//
|
||||||
// opts may contain additional configuration options if non-nil.
|
// opts may contain additional configuration options if non-nil.
|
||||||
//
|
//
|
||||||
@ -187,6 +189,7 @@ func InitPushExt(pushURL string, interval time.Duration, extraLabels string, wri
|
|||||||
// See https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#text-based-format
|
// See https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md#text-based-format
|
||||||
//
|
//
|
||||||
// The periodic push is stopped when the ctx is canceled.
|
// The periodic push is stopped when the ctx is canceled.
|
||||||
|
// It is possible to wait until the background metrics push worker is stopped on a WaitGroup passed via opts.WaitGroup.
|
||||||
//
|
//
|
||||||
// opts may contain additional configuration options if non-nil.
|
// opts may contain additional configuration options if non-nil.
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user