idallocator

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Allocate

func Allocate() uint16

Allocate returns a new random ID from the pool

func ReallocatePool

func ReallocatePool()

ReallocatePool starts over with a new pool. This function is only used for tests and its implementation is not optimized for production.

func Release

func Release(id uint16) error

Release releases an endpoint ID that was previously allocated or reused

func Reuse

func Reuse(id uint16) error

Reuse grabs a specific endpoint ID for reuse. This can be used when restoring endpoints.

Types

This section is empty.

Jump to

Keyboard shortcuts

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