internal

package
v0.0.0-...-bdd3411 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: MIT Imports: 5 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 uint64
const (
	NilID ID = 0
)

func KeyToID

func KeyToID(k []byte) (ID, error)

KeyToID converts a key to an ID.

func NewID

func NewID() ID

NewID generates an ID based on the current time.

func (ID) Key

func (id ID) Key() []byte

Key returns the byte representation of this ID.

type IDHeap

type IDHeap []ID

IDHeap is a sorted set of IDs.

func NewIDHeap

func NewIDHeap() *IDHeap

NewIDHeap constructs a new ID heap.

func (IDHeap) Len

func (h IDHeap) Len() int

func (IDHeap) Less

func (h IDHeap) Less(i, j int) bool

func (*IDHeap) Pop

func (h *IDHeap) Pop() interface{}

func (*IDHeap) PopID

func (h *IDHeap) PopID() ID

PopID pops the first ID from the heap.

func (*IDHeap) Push

func (h *IDHeap) Push(x interface{})

func (*IDHeap) PushID

func (h *IDHeap) PushID(id ID)

PushID pushes an ID onto the heap.

func (IDHeap) Swap

func (h IDHeap) Swap(i, j int)

Jump to

Keyboard shortcuts

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