package
1.11.9
Repository: https://github.com/xmidt-org/webpa-common.git
Documentation: pkg.go.dev

# Functions

CloseableMutex is syntactic sugar for NewCloseable(1).
Instrument decorates an existing semaphore with instrumentation.
InstrumentCloseable is similar to Instrument, but works with Closeable semaphores.
Mutex is just syntactic sugar for New(1).
New constructs a semaphore with the given count.
NewCloseable returns a semaphore which honors close-once semantics.
WithClosed sets a gauge that records the state of a Closeable semaphore, 1.0 for open and 0.0 for closed.
WithFailures establishes a metric that tracks how many times a resource was unable to be acquired, due to timeouts, context cancellations, etc.
WithResources establishes a metric that tracks the resource count of the semaphore.

# Constants

No description provided by the author
No description provided by the author

# Variables

ErrClosed is returned when a closeable semaphore has been closed.
ErrTimeout is returned when a timeout occurs while waiting to acquire a semaphore resource.

# Interfaces

Closeable represents a semaphore than can be closed.
Interface represents a semaphore, either binary or counting.

# Type aliases

InstrumentOption represents a configurable option for instrumenting a semaphore.