uid_pool

package
v0.0.0-...-68efac8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolExhaustedError

type PoolExhaustedError struct{}

func (PoolExhaustedError) Error

func (e PoolExhaustedError) Error() string

type UIDPool

type UIDPool interface {
	Acquire() (uint32, error)
	Remove(uint32) error
	Release(uint32)
	InitialSize() int
}

type UIDTakenError

type UIDTakenError struct {
	UID uint32
}

func (UIDTakenError) Error

func (e UIDTakenError) Error() string

type UnixUIDPool

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

func New

func New(start, size uint32) *UnixUIDPool

func (*UnixUIDPool) Acquire

func (p *UnixUIDPool) Acquire() (uint32, error)

func (*UnixUIDPool) InitialSize

func (p *UnixUIDPool) InitialSize() int

func (*UnixUIDPool) Release

func (p *UnixUIDPool) Release(uid uint32)

func (*UnixUIDPool) Remove

func (p *UnixUIDPool) Remove(uid uint32) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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