CollectorRegistry

A thread-safe registry for Collector instances.

The CollectorRegistry keeps track of registered collectors and provides utilities to register, unregister, clear, and list collectors.

All operations are safe to use in concurrent and coroutine-based environments.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun clear()

Clears all registered collectors from the registry.

Link copied to clipboard
suspend fun collect(): List<Collector>

Asynchronously collects all registered Collectors.

Link copied to clipboard
suspend fun getCollectors(): List<Collector>

Retrieves the current list of registered collectors.

Link copied to clipboard
suspend fun register(collector: Collector)

Registers a new Collector in this registry.

Link copied to clipboard
suspend fun unregister(collector: Collector)

Unregisters a Collector from the registry.