Discover Packages
github.com/jrife/flock
storage
kv
keys
package
Version:
v0.0.0-...-2627f95
Opens a new window with list of versions in this module.
Published: Jun 25, 2020
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Compare compares two keys
-1 means a < b
1 means a > b
0 means a = b
Int64ToKey constructs a key from an
int64
KeyToInt64 constructs an int64 from a
byte array
type Range struct {
Min []byte
Max []byte
}
Range represents all keys such that
k >= Min and k < Max
If Min = nil that indicates the start of all keys
If Max = nil that indicatese the end of all keys
If multiple modifiers are called on a range the end
result is effectively the same as ANDing all the
restrictions.
All returns a new key range matching all keys
Contains returns true if the range contains
key
Eq confines the range to just key k
Gt confines the range to keys that are
greater than k
Gte confines the range to keys that are
greater than or equal to k
Lt confines the range to keys that are
less than k
Lte confines the range to keys that are
less than or equal to k
Namespace namespaces keys in the range with
to keys with the prefix ns. Subsequent modifier
methods will keep keys within this namespace.
Prefix confines the range to keys that
have the prefix k, excluding k itself
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.