Package bitseq provides a structure and utilities for representing long bitmask as sequence of run-length encoded blocks. It operates directly on the encoded representation, it does not decode/encode.
Handle contains the sequence representing the bitmask and its identifier
NewHandle returns a thread-safe instance of the bitmask handler
Bits returns the length of the bit sequence
CheckConsistency checks if the bit sequence is in an inconsistent state and attempts to fix it. It looks for a corruption signature that may happen in docker 1.9.0 and 1.9.1.
CopyTo deep copies the handle into the passed destination object
DataScope method returns the storage scope of the datastore
Destroy removes from the datastore the data belonging to this handle
Exists method is true if this object has been stored in the DB.
FromByteArray reads his handle's data from a byte array
Index returns the latest DB Index as seen by this object
IsSet atomically checks if the ordinal bit is set. In case ordinal is outside of the bit sequence limits, false is returned.
Key provides the Key to be used in KV Store
KeyPrefix returns the immediate parent key that can be used for tree walk
MarshalJSON encodes Handle into json message
New method returns a handle based on the receiver handle
Set atomically sets the corresponding bit in the sequence
SetAny atomically sets the first unset bit in the sequence and returns the corresponding ordinal
SetAnyInRange atomically sets the first unset bit in the specified range in the sequence and returns the corresponding ordinal
SetIndex method allows the datastore to store the latest DB Index into this object
SetValue unmarshals the data from the KV store
Skip provides a way for a KV Object to avoid persisting it in the KV Store
ToByteArray converts this handle's data into a byte array
UnmarshalJSON decodes json message into Handle
Unselected returns the number of bits which are not selected
Unset atomically unsets the corresponding bit in the sequence
Value marshals the data to be stored in the KV store