Documentation ¶
Index ¶
- Constants
- type DVV
- func (dvv *DVV) Context() map[string]uint64
- func (dvv *DVV) Dot() Dot
- func (dvv *DVV) Equals(otherDVV *DVV) bool
- func (dvv *DVV) HappenedBefore(otherDVV *DVV) bool
- func (dvv *DVV) Hash() Hash
- func (dvv *DVV) MarshalBinary() ([]byte, error)
- func (dvv *DVV) MaxDot(nodeID string) uint64
- func (dvv *DVV) Replicas() []string
- func (dvv *DVV) UnmarshalBinary(data []byte) error
- type Diff
- type Dot
- type Hash
- type Row
- type Sibling
- func (sibling *Sibling) Clock() *DVV
- func (sibling *Sibling) Compare(otherSibling *Sibling) int
- func (sibling *Sibling) Hash() Hash
- func (sibling *Sibling) IsTombstone() bool
- func (sibling *Sibling) MarshalBinary() ([]byte, error)
- func (sibling *Sibling) Timestamp() uint64
- func (sibling *Sibling) UnmarshalBinary(data []byte) error
- func (sibling *Sibling) Value() []byte
- type SiblingSet
- func (siblingSet *SiblingSet) Add(sibling *Sibling) *SiblingSet
- func (siblingSet *SiblingSet) CanPurge(timestampCutoff uint64) bool
- func (siblingSet *SiblingSet) Decode(encodedSiblingSet []byte) error
- func (siblingSet *SiblingSet) Delete(sibling *Sibling) *SiblingSet
- func (siblingSet *SiblingSet) Diff(otherSiblingSet *SiblingSet) *SiblingSet
- func (siblingSet *SiblingSet) Discard(clock *DVV) *SiblingSet
- func (siblingSet *SiblingSet) Encode() []byte
- func (siblingSet *SiblingSet) Event(contextClock map[string]uint64, replica string) *DVV
- func (siblingSet *SiblingSet) GetOldestTombstone() *Sibling
- func (siblingSet *SiblingSet) Has(sibling *Sibling) bool
- func (siblingSet *SiblingSet) Hash(key []byte) Hash
- func (siblingSet *SiblingSet) IsTombstoneSet() bool
- func (siblingSet *SiblingSet) Iter() <-chan *Sibling
- func (siblingSet *SiblingSet) Join() map[string]uint64
- func (siblingSet *SiblingSet) JoinOne(replica string) uint64
- func (siblingSet *SiblingSet) MarshalBinary() ([]byte, error)
- func (siblingSet *SiblingSet) MarshalJSON() ([]byte, error)
- func (siblingSet *SiblingSet) MergeSync(otherSiblingSet *SiblingSet, replica string) *SiblingSet
- func (siblingSet *SiblingSet) Size() int
- func (siblingSet *SiblingSet) Sync(otherSiblingSet *SiblingSet) *SiblingSet
- func (siblingSet *SiblingSet) UnmarshalBinary(data []byte) error
- func (siblingSet *SiblingSet) UnmarshalJSON(data []byte) error
- func (siblingSet *SiblingSet) Value() []byte
- type SiblingSetIterator
- type Update
Constants ¶
View Source
const (
HASH_SIZE_BYTES = 16
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
func (Diff) NewSiblingSet ¶
func (diff Diff) NewSiblingSet() *SiblingSet
func (Diff) OldSiblingSet ¶
func (diff Diff) OldSiblingSet() *SiblingSet
type Row ¶
type Row struct { Key string `json:"key"` LocalVersion uint64 `json:"localVersion"` Siblings *SiblingSet `json:"siblings"` }
type Sibling ¶
type Sibling struct { VectorClock *DVV `json:"clock"` BinaryValue []byte `json:"value"` PhysicalTimestamp uint64 `json:"timestamp"` }
func (*Sibling) Compare ¶
provides an ordering between siblings in order to break ties and decide which one to keep when two siblings have the same clock value. Favors keeping a value instead of a tombstone.
func (*Sibling) IsTombstone ¶
func (*Sibling) MarshalBinary ¶
func (*Sibling) UnmarshalBinary ¶
type SiblingSet ¶
type SiblingSet struct {
// contains filtered or unexported fields
}
func NewSiblingSet ¶
func NewSiblingSet(siblings map[*Sibling]bool) *SiblingSet
func (*SiblingSet) Add ¶
func (siblingSet *SiblingSet) Add(sibling *Sibling) *SiblingSet
func (*SiblingSet) CanPurge ¶
func (siblingSet *SiblingSet) CanPurge(timestampCutoff uint64) bool
func (*SiblingSet) Decode ¶
func (siblingSet *SiblingSet) Decode(encodedSiblingSet []byte) error
func (*SiblingSet) Delete ¶
func (siblingSet *SiblingSet) Delete(sibling *Sibling) *SiblingSet
func (*SiblingSet) Diff ¶
func (siblingSet *SiblingSet) Diff(otherSiblingSet *SiblingSet) *SiblingSet
func (*SiblingSet) Discard ¶
func (siblingSet *SiblingSet) Discard(clock *DVV) *SiblingSet
func (*SiblingSet) Encode ¶
func (siblingSet *SiblingSet) Encode() []byte
func (*SiblingSet) Event ¶
func (siblingSet *SiblingSet) Event(contextClock map[string]uint64, replica string) *DVV
func (*SiblingSet) GetOldestTombstone ¶
func (siblingSet *SiblingSet) GetOldestTombstone() *Sibling
func (*SiblingSet) Has ¶
func (siblingSet *SiblingSet) Has(sibling *Sibling) bool
func (*SiblingSet) Hash ¶
func (siblingSet *SiblingSet) Hash(key []byte) Hash
func (*SiblingSet) IsTombstoneSet ¶
func (siblingSet *SiblingSet) IsTombstoneSet() bool
func (*SiblingSet) Iter ¶
func (siblingSet *SiblingSet) Iter() <-chan *Sibling
func (*SiblingSet) Join ¶
func (siblingSet *SiblingSet) Join() map[string]uint64
func (*SiblingSet) JoinOne ¶
func (siblingSet *SiblingSet) JoinOne(replica string) uint64
func (*SiblingSet) MarshalBinary ¶
func (siblingSet *SiblingSet) MarshalBinary() ([]byte, error)
func (*SiblingSet) MarshalJSON ¶
func (siblingSet *SiblingSet) MarshalJSON() ([]byte, error)
func (*SiblingSet) MergeSync ¶
func (siblingSet *SiblingSet) MergeSync(otherSiblingSet *SiblingSet, replica string) *SiblingSet
func (*SiblingSet) Size ¶
func (siblingSet *SiblingSet) Size() int
func (*SiblingSet) Sync ¶
func (siblingSet *SiblingSet) Sync(otherSiblingSet *SiblingSet) *SiblingSet
func (*SiblingSet) UnmarshalBinary ¶
func (siblingSet *SiblingSet) UnmarshalBinary(data []byte) error
func (*SiblingSet) UnmarshalJSON ¶
func (siblingSet *SiblingSet) UnmarshalJSON(data []byte) error
func (*SiblingSet) Value ¶
func (siblingSet *SiblingSet) Value() []byte
type SiblingSetIterator ¶
type Update ¶
type Update struct {
// contains filtered or unexported fields
}
func (*Update) AddDiff ¶
func (update *Update) AddDiff(key string, oldSiblingSet *SiblingSet, newSiblingSet *SiblingSet) *Update
Click to show internal directories.
Click to hide internal directories.