id

package
v0.0.0-...-b5b2f04 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID uint32

ID define a unique number.

func New

func New() ID

New returns a new unique ID from the global Registry.

type Identifiable

type Identifiable interface {
	ID() ID
	IsSame(other Identifiable) bool
}

Identifiable define any object containing a unique ID.

type Registry

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

Registry define an identifier registry. All id generated from the same registry are unique.

func (*Registry) Last

func (r *Registry) Last() ID

Last returns the most recent ID generated.

func (*Registry) New

func (r *Registry) New() ID

New returns a new unique ID.

Jump to

Keyboard shortcuts

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