Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDTable ¶
IDTable is a map with random indexes for jobs and other cases where a random but unique index is required
type OrderedIDTable ¶ added in v0.3.1
type OrderedIDTable[T any] struct { // contains filtered or unexported fields }
OrderedIDTable is a map with incremental indexes, it's faster than IDTable by orders of magnitude, but will eventually run out of IDs (after 2^64 assignments)
func (OrderedIDTable[T]) Assign ¶ added in v0.3.1
func (id OrderedIDTable[T]) Assign(val T) uint64
func (OrderedIDTable[T]) Delete ¶ added in v0.3.1
func (id OrderedIDTable[T]) Delete(index uint64)
func (OrderedIDTable[T]) Get ¶ added in v0.3.1
func (id OrderedIDTable[T]) Get(index uint64) (T, bool)
func (OrderedIDTable[T]) Replace ¶ added in v0.3.1
func (id OrderedIDTable[T]) Replace(index uint64, val T)
Click to show internal directories.
Click to hide internal directories.