Documentation ¶
Index ¶
- Constants
- Variables
- func NanoToMilli(v uint64) uint64
- type BasicSiblingSetIterator
- func (ssIterator *BasicSiblingSetIterator) Error() error
- func (ssIterator *BasicSiblingSetIterator) Key() []byte
- func (ssIterator *BasicSiblingSetIterator) LocalVersion() uint64
- func (ssIterator *BasicSiblingSetIterator) Next() bool
- func (ssIterator *BasicSiblingSetIterator) Prefix() []byte
- func (ssIterator *BasicSiblingSetIterator) Release()
- func (ssIterator *BasicSiblingSetIterator) Value() *SiblingSet
- type Bucket
- type BucketList
- func (bucketList *BucketList) AddBucket(bucket Bucket) *BucketList
- func (bucketList *BucketList) All() []Bucket
- func (bucketList *BucketList) Get(bucketName string) Bucket
- func (bucketList *BucketList) HasBucket(bucketName string) bool
- func (bucketList *BucketList) Incoming(peerID string) []Bucket
- func (bucketList *BucketList) Outgoing(peerID string) []Bucket
- type MerkleChildrenIterator
- func (mIterator *MerkleChildrenIterator) Error() error
- func (mIterator *MerkleChildrenIterator) Key() []byte
- func (mIterator *MerkleChildrenIterator) LocalVersion() uint64
- func (mIterator *MerkleChildrenIterator) Next() bool
- func (mIterator *MerkleChildrenIterator) Prefix() []byte
- func (mIterator *MerkleChildrenIterator) Release()
- func (mIterator *MerkleChildrenIterator) Value() *SiblingSet
- type Monitor
- type Store
- func (store *Store) Batch(batch *UpdateBatch) (map[string]*SiblingSet, error)
- func (store *Store) Forget(keys [][]byte) error
- func (store *Store) GarbageCollect(tombstonePurgeAge uint64) error
- func (store *Store) Get(keys [][]byte) ([]*SiblingSet, error)
- func (store *Store) GetAll() (SiblingSetIterator, error)
- func (store *Store) GetMatches(keys [][]byte) (SiblingSetIterator, error)
- func (store *Store) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
- func (store *Store) Initialize(nodeID string, storageDriver StorageDriver, merkleDepth uint8, ...) error
- func (store *Store) LockReads()
- func (store *Store) LockWrites()
- func (store *Store) Merge(siblingSets map[string]*SiblingSet) error
- func (store *Store) MerkleTree() *MerkleTree
- func (store *Store) RebuildMerkleLeafs() error
- func (store *Store) RecordMetadata() error
- func (store *Store) UnlockReads()
- func (store *Store) UnlockWrites()
- func (store *Store) UpgradeStorageFormat() error
- func (store *Store) Watch(ctx context.Context, keys [][]byte, prefixes [][]byte, localVersion uint64, ...)
- type UpdateBatch
- func (updateBatch *UpdateBatch) Batch() *Batch
- func (updateBatch *UpdateBatch) Context() map[string]*DVV
- func (updateBatch *UpdateBatch) Delete(key []byte, context *DVV) (*UpdateBatch, error)
- func (updateBatch *UpdateBatch) FromJSON(reader io.Reader) error
- func (updateBatch *UpdateBatch) Put(key []byte, value []byte, context *DVV) (*UpdateBatch, error)
- func (updateBatch *UpdateBatch) ToJSON() ([]byte, error)
- type UpdateHeap
Constants ¶
View Source
const MAX_SORTING_KEY_LENGTH = 255
View Source
const StorageFormatVersion = "1"
View Source
const UpgradeFormatBatchSize = 100
Variables ¶
View Source
var ENoSuchBucket = errors.New("No such bucket")
View Source
var MASTER_MERKLE_TREE_PREFIX = []byte{0}
View Source
var NODE_METADATA_PREFIX = []byte{3}
View Source
var PARTITION_DATA_PREFIX = []byte{2}
View Source
var PARTITION_MERKLE_LEAF_PREFIX = []byte{1}
Functions ¶
func NanoToMilli ¶
Types ¶
type BasicSiblingSetIterator ¶
type BasicSiblingSetIterator struct {
// contains filtered or unexported fields
}
func NewBasicSiblingSetIterator ¶
func NewBasicSiblingSetIterator(dbIterator StorageIterator, storageFormatVersion string) *BasicSiblingSetIterator
func (*BasicSiblingSetIterator) Error ¶
func (ssIterator *BasicSiblingSetIterator) Error() error
func (*BasicSiblingSetIterator) Key ¶
func (ssIterator *BasicSiblingSetIterator) Key() []byte
func (*BasicSiblingSetIterator) LocalVersion ¶
func (ssIterator *BasicSiblingSetIterator) LocalVersion() uint64
func (*BasicSiblingSetIterator) Next ¶
func (ssIterator *BasicSiblingSetIterator) Next() bool
func (*BasicSiblingSetIterator) Prefix ¶
func (ssIterator *BasicSiblingSetIterator) Prefix() []byte
func (*BasicSiblingSetIterator) Release ¶
func (ssIterator *BasicSiblingSetIterator) Release()
func (*BasicSiblingSetIterator) Value ¶
func (ssIterator *BasicSiblingSetIterator) Value() *SiblingSet
type Bucket ¶
type Bucket interface { Name() string ShouldReplicateOutgoing(peerID string) bool ShouldReplicateIncoming(peerID string) bool ShouldAcceptWrites(clientID string) bool ShouldAcceptReads(clientID string) bool RecordMetadata() error RebuildMerkleLeafs() error MerkleTree() *MerkleTree GarbageCollect(tombstonePurgeAge uint64) error Get(keys [][]byte) ([]*SiblingSet, error) GetMatches(keys [][]byte) (SiblingSetIterator, error) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error) GetAll() (SiblingSetIterator, error) Forget(keys [][]byte) error Batch(batch *UpdateBatch) (map[string]*SiblingSet, error) Merge(siblingSets map[string]*SiblingSet) error Watch(ctx context.Context, keys [][]byte, prefixes [][]byte, localVersion uint64, ch chan Row) LockWrites() UnlockWrites() LockReads() UnlockReads() }
type BucketList ¶
type BucketList struct {
// contains filtered or unexported fields
}
func NewBucketList ¶
func NewBucketList() *BucketList
func (*BucketList) AddBucket ¶
func (bucketList *BucketList) AddBucket(bucket Bucket) *BucketList
func (*BucketList) All ¶
func (bucketList *BucketList) All() []Bucket
func (*BucketList) Get ¶
func (bucketList *BucketList) Get(bucketName string) Bucket
func (*BucketList) HasBucket ¶
func (bucketList *BucketList) HasBucket(bucketName string) bool
func (*BucketList) Incoming ¶
func (bucketList *BucketList) Incoming(peerID string) []Bucket
func (*BucketList) Outgoing ¶
func (bucketList *BucketList) Outgoing(peerID string) []Bucket
type MerkleChildrenIterator ¶
type MerkleChildrenIterator struct {
// contains filtered or unexported fields
}
func NewMerkleChildrenIterator ¶
func NewMerkleChildrenIterator(iter StorageIterator, storageDriver StorageDriver, storageFormatVersion string) *MerkleChildrenIterator
func (*MerkleChildrenIterator) Error ¶
func (mIterator *MerkleChildrenIterator) Error() error
func (*MerkleChildrenIterator) Key ¶
func (mIterator *MerkleChildrenIterator) Key() []byte
func (*MerkleChildrenIterator) LocalVersion ¶
func (mIterator *MerkleChildrenIterator) LocalVersion() uint64
func (*MerkleChildrenIterator) Next ¶
func (mIterator *MerkleChildrenIterator) Next() bool
func (*MerkleChildrenIterator) Prefix ¶
func (mIterator *MerkleChildrenIterator) Prefix() []byte
func (*MerkleChildrenIterator) Release ¶
func (mIterator *MerkleChildrenIterator) Release()
func (*MerkleChildrenIterator) Value ¶
func (mIterator *MerkleChildrenIterator) Value() *SiblingSet
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
func NewMonitor ¶
func (*Monitor) AddListener ¶
func (*Monitor) DiscardIDRange ¶
This should be called if an ID range was reserved for a series of updates but those updates failed to be submitted so the range needs to be discarded
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) GarbageCollect ¶
func (*Store) GetMatches ¶
func (*Store) GetSyncChildren ¶
func (*Store) Initialize ¶
func (*Store) LockWrites ¶
func (store *Store) LockWrites()
func (*Store) MerkleTree ¶
func (store *Store) MerkleTree() *MerkleTree
func (*Store) RebuildMerkleLeafs ¶
func (*Store) RecordMetadata ¶
func (*Store) UnlockReads ¶
func (store *Store) UnlockReads()
func (*Store) UnlockWrites ¶
func (store *Store) UnlockWrites()
func (*Store) UpgradeStorageFormat ¶
type UpdateBatch ¶
type UpdateBatch struct { RawBatch *Batch `json:"batch"` Contexts map[string]*DVV `json:"context"` }
func NewUpdateBatch ¶
func NewUpdateBatch() *UpdateBatch
func (*UpdateBatch) Batch ¶
func (updateBatch *UpdateBatch) Batch() *Batch
func (*UpdateBatch) Context ¶
func (updateBatch *UpdateBatch) Context() map[string]*DVV
func (*UpdateBatch) Delete ¶
func (updateBatch *UpdateBatch) Delete(key []byte, context *DVV) (*UpdateBatch, error)
func (*UpdateBatch) Put ¶
func (updateBatch *UpdateBatch) Put(key []byte, value []byte, context *DVV) (*UpdateBatch, error)
func (*UpdateBatch) ToJSON ¶
func (updateBatch *UpdateBatch) ToJSON() ([]byte, error)
type UpdateHeap ¶
func (UpdateHeap) Len ¶
func (h UpdateHeap) Len() int
func (UpdateHeap) Less ¶
func (h UpdateHeap) Less(i, j int) bool
func (*UpdateHeap) Pop ¶
func (h *UpdateHeap) Pop() interface{}
func (*UpdateHeap) Push ¶
func (h *UpdateHeap) Push(x interface{})
func (UpdateHeap) Swap ¶
func (h UpdateHeap) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.