Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool keeps track of uint64 identifiers.
Caller is reponsible for locking.
func (*Pool) Get ¶
Get returns an available id from the pool.
Get panics if the pool is exhausted; 2**64 should be enough for everyone.
func (*Pool) SetMinimum ¶
SetMinimum sets the minimum value that will be returned. This is useful for reserving some ids for special use.
Click to show internal directories.
Click to hide internal directories.