Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiValue ¶
type MultiValue struct {
// contains filtered or unexported fields
}
MultiValue represents multiple values with at versions in sorted order.
func Append ¶
func Append(mv *MultiValue, v *Value) *MultiValue
Append returns a copy of the input multi-value with a newer version to end. Version of the appending value *must* be larger than all existing versions.
func Compact ¶
func Compact(mv *MultiValue, minVersion int64) *MultiValue
Compact drops older data before the given version unless it is not the only version and is not deleted. Returns the same input multi-value if no compaction can be performed; otherwise, returns a clone of the input multi-value.
func NewMultiValue ¶
func NewMultiValue(v *Value) *MultiValue
NewMultiValue creates a multi-value with initial version.
func (*MultiValue) Fetch ¶
func (mv *MultiValue) Fetch(version int64) (v *Value, found bool)
Fetch returns the value found at the given version or the closest lower version to the given version. Returned value can be a deleted value.
func (*MultiValue) String ¶
func (mv *MultiValue) String() string
String returns the MultiValue as a human-readable string.