bkey

package
v0.0.0-...-697f9a0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertTrue

func AssertTrue(b bool)

AssertTrue asserts that b is true. Otherwise, it would log fatal.

func CompareKeys

func CompareKeys(key1 []byte, key2 []byte) int

CompareKeys checks the key without version and then checks the version. a<version> would be sorted higher than aa<version> if we use bytes.compare All keys should have version.

func KeyWithVersion

func KeyWithVersion(key []byte, version uint64) []byte

KeyWithVersion generates a new key by appending ts to key.

func ParseKey

func ParseKey(key []byte) []byte

ParseKey parses the actual key from the key bytes.

func ParseVersion

func ParseVersion(key []byte) uint64

ParseVersion parses the version from the key bytes.

func SameKey

func SameKey(src, dst []byte) bool

SameKey checks for key equality ignoring the version timestamp suffix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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