uuid

package
v0.0.0-...-89ca9ea Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Max = int64(^uint64(0) >> 1)

Max is the maximum value of int64

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

Set implements available ID storage

func NewSet

func NewSet() Set

NewSet returns a new Set.

func (*Set) NewID

func (s *Set) NewID() int64

NewID returns a new unique ID. The ID returned is not considered used until passed in a call to use

func (*Set) Release

func (s *Set) Release(id int64)

Release frees the id for reuse.

func (*Set) Use

func (s *Set) Use(id int64)

Use adds the id to the used IDs in the set.

Jump to

Keyboard shortcuts

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