Documentation ¶
Overview ¶
Package collector provides metrics collector
Package collector provides metrics collector
Index ¶
- type Collector
- type CollectorOption
- func WithCGOMetrics(enabled bool) CollectorOption
- func WithDuration(dur string) CollectorOption
- func WithErrGroup(eg errgroup.Group) CollectorOption
- func WithGoroutineMetrics(enabled bool) CollectorOption
- func WithMemoryMetrics(enabled bool) CollectorOption
- func WithMetrics(metrics ...metrics.Metric) CollectorOption
- func WithVersionInfo(enabled bool, labels ...string) CollectorOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { PreStart(ctx context.Context) error Start(ctx context.Context) <-chan error Stop(ctx context.Context) }
func New ¶
func New(opts ...CollectorOption) (Collector, error)
type CollectorOption ¶
type CollectorOption func(*collector) error
func WithCGOMetrics ¶
func WithCGOMetrics(enabled bool) CollectorOption
func WithDuration ¶
func WithDuration(dur string) CollectorOption
func WithErrGroup ¶
func WithErrGroup(eg errgroup.Group) CollectorOption
func WithGoroutineMetrics ¶
func WithGoroutineMetrics(enabled bool) CollectorOption
func WithMemoryMetrics ¶
func WithMemoryMetrics(enabled bool) CollectorOption
func WithMetrics ¶
func WithMetrics(metrics ...metrics.Metric) CollectorOption
func WithVersionInfo ¶
func WithVersionInfo(enabled bool, labels ...string) CollectorOption
Click to show internal directories.
Click to hide internal directories.