Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enumerator ¶
Enumerator returns a set of functions to request() and release() a SID (serialized numeric ID) from an available limited numeric pool range. The SID can be released in any order, but requests are always forward looking and will be the next sequential one available.
Size the pool properly to avoid exhaustion and blocking while waiting for a SID to become available. For example, if you consume 1000 sid/sec and hold a SID for 3 seconds on average, an appropraite size might be found like this: (1000*3) *2 = 6000
Types ¶
type Number ¶ added in v1.1.0
type Number uint64
Number provides a persistent sequential serial number type that can be persisted to disk; utilizes the first 7 bytes of uint64
Click to show internal directories.
Click to hide internal directories.