ids

package
v0.0.0-...-2ee7648 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandID

type CommandID uint64

CommandID identifies commands from each bench, can be any integer type.

type ID

type ID string

ID represents a generic identifier in format of Zone.Node

func GetID

func GetID() ID

GetID gets the current id specified in flag variables

func NewID

func NewID(zone, node uint8) ID

func (ID) Node

func (i ID) Node() uint8

Node returns Node ID component

func (ID) Zone

func (i ID) Zone() uint8

Zone returns Zond ID component

type Key

type Key []byte

type ObjID

type ObjID struct {
	Key   Key
	Table string

	IsRange bool
}

func NewObjID

func NewObjID(k Key, table string, isRange bool) *ObjID

func ObjIDFromB64

func ObjIDFromB64(k string, table string, isRange bool) *ObjID

func ObjIDFromFromInt

func ObjIDFromFromInt(k int, table string, isRange bool) *ObjID

func ObjIDFromInt64

func ObjIDFromInt64(k int64, table string, isRange bool) *ObjID

func ObjIDFromString

func ObjIDFromString(k string, table string, isRange bool) *ObjID

func (*ObjID) B64

func (objID *ObjID) B64() string

func (*ObjID) Bucket

func (objID *ObjID) Bucket(numBuckets int) int

func (*ObjID) Clone

func (objID *ObjID) Clone() *ObjID

func (*ObjID) String

func (objID *ObjID) String() string

type TXID

type TXID uint64

ID represents a generic identifier in format of Zone.Node

func NewTXID

func NewTXID(zone, node uint8, txNum int) TXID

func (TXID) ID

func (i TXID) ID() ID

func (TXID) Node

func (i TXID) Node() int

Node returns Node ID component

func (TXID) String

func (i TXID) String() string

func (TXID) TxNum

func (i TXID) TxNum() int

TxNum returns TxNum ID component

func (TXID) Zone

func (i TXID) Zone() int

Zone returns Zond ID component

Jump to

Keyboard shortcuts

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