Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

counter

v1.47.0
go.opentelemetry.io/otel/sdk/log/internal/counter

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

3 matches

Top ↑

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.

Dependency graph