Documentation
¶
Overview ¶
Package sequence provides per-shard monotonic sequence counters. Each counter is an independent atomic uint64 that increments without locking, giving O(1) Next calls with no contention between shards.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counters ¶
type Counters struct {
// contains filtered or unexported fields
}
Counters holds one atomic counter per shard group. Create with NewCounters; safe for concurrent use by multiple goroutines.
func NewCounters ¶
NewCounters allocates a Counters with numShards independent counters, all starting at zero. numShards should equal shard.Engine.NumGroups().
Click to show internal directories.
Click to hide internal directories.