allocator

package
v0.0.0-...-34e0b2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocator

type Allocator interface {
	AllocID() (typeutil.UniqueID, error)
}

type AtomicAllocator

type AtomicAllocator struct {
	// contains filtered or unexported fields
}

func NewAllocator

func NewAllocator(opts ...Option) *AtomicAllocator

func NewAllocatorFromList

func NewAllocatorFromList(s []int64, useClone, deAsc bool) *AtomicAllocator

func (*AtomicAllocator) AllocID

func (alloc *AtomicAllocator) AllocID() (typeutil.UniqueID, error)

type Option

type Option func(allocator *AtomicAllocator)

func WithDelta

func WithDelta(delta int64) Option

func WithInitializedValue

func WithInitializedValue(value int64) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL