counter
v1.47.0
go.opentelemetry.io/otel/sdk/log/internal/counter
Documentation
pkg.go.dev ↗Package counter provides a simple counter for generating unique IDs.
This package is used to generate unique IDs while allowing testing packages to reset the counter.
Functions
NextExporterID
func NextExporterID() int64
NextExporterID returns the next unique ID for an exporter.
SetExporterID
func SetExporterID(v int64) int64
SetExporterID sets the exporter ID counter to v and returns the previous value.
This function is useful for testing purposes, allowing you to reset the counter. It should not be used in production code.