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 ¶
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 ¶
func (id *OrderedIDTable[T]) Assign(val T) uint64
func (*OrderedIDTable[T]) Delete ¶
func (id *OrderedIDTable[T]) Delete(index uint64)
func (*OrderedIDTable[T]) Get ¶
func (id *OrderedIDTable[T]) Get(index uint64) (T, bool)
func (*OrderedIDTable[T]) Replace ¶
func (id *OrderedIDTable[T]) Replace(index uint64, val T)
Click to show internal directories.
Click to hide internal directories.