Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB[T constraints.Integer] interface { GetConfig() (T, T) Set(e Entry[T]) error Get(id T) (Entry[T], error) GetByLabel(selector labels.Selector) Entries[T] GetAll() Entries[T] Has(id T) bool Delete(id T) error Count() int Iterate() *Iterator[T] IterateFree() *Iterator[T] FindFree() (Entry[T], error) FindFreeID(id T) (Entry[T], error) FindFreeRange(min, size T) (Entries[T], error) FindFreeSize(size T) (Entries[T], error) }
type DBConfig ¶
type DBConfig[T constraints.Integer] struct { Offset T MaxEntries T InitEntries Entries[T] SetValidation ValidationFn[T] DeleteValidation ValidationFn[T] }
type Entries ¶
type Entries[T constraints.Integer] []Entry[T]
type Entry ¶
type Entry[T constraints.Integer] interface { ID() T Labels() labels.Set String() string }
type Iterator ¶
type Iterator[T constraints.Integer] struct { // contains filtered or unexported fields }
func (*Iterator[T]) IsConsecutive ¶
type ValidationFn ¶
type ValidationFn[T constraints.Integer] func(id T) error
Click to show internal directories.
Click to hide internal directories.