Versions in this module Expand all Collapse all v0 v0.1.3 Oct 3, 2023 v0.1.2 Oct 3, 2023 Changes in this version + var DefaultManagerOptions = &ManagerOptions + type IncreaseIndexCallback func(sequenceID SequenceID, currentHighestIndex Index) bool + type Index uint64 + func (i Index) Length() int + func (i Index) String() (humanReadable string) + type Manager struct + Options *ManagerOptions + func NewManager(options ...ManagerOption) (newManager *Manager) + func (m *Manager) InheritStructureDetails(referencedStructureDetails []*StructureDetails, ...) (inheritedStructureDetails *StructureDetails, newSequenceCreated bool) + func (m *Manager) Sequence(sequenceID SequenceID) *objectstorage.CachedObject[*Sequence] + func (m *Manager) Shutdown() + type ManagerOption func(options *ManagerOptions) + func WithCacheTime(cacheTime time.Duration) ManagerOption + func WithMaxPastMarkerDistance(distance uint64) ManagerOption + func WithStore(store kvstore.KVStore) ManagerOption + type ManagerOptions struct + CacheTime time.Duration + MaxPastMarkerDistance uint64 + Store kvstore.KVStore + func (m *ManagerOptions) Apply(options ...ManagerOption) (managerOptions *ManagerOptions) + type Marker struct + func NewMarker(sequenceID SequenceID, index Index) Marker + func (m Marker) Bytes() (serialized []byte) + func (m Marker) Index() (index Index) + func (m Marker) SequenceID() (sequenceID SequenceID) + type Markers struct + func NewMarkers(markers ...Marker) (new *Markers) + func (m *Markers) Bytes() []byte + func (m *Markers) Clone() (cloned *Markers) + func (m *Markers) Delete(sequenceID SequenceID) (existed bool) + func (m *Markers) Equals(other *Markers) (equals bool) + func (m *Markers) ForEach(iterator func(sequenceID SequenceID, index Index) bool) (success bool) + func (m *Markers) ForEachSorted(iterator func(sequenceID SequenceID, index Index) bool) (success bool) + func (m *Markers) Get(sequenceID SequenceID) (index Index, exists bool) + func (m *Markers) HighestIndex() (highestIndex Index) + func (m *Markers) LowestIndex() (lowestIndex Index) + func (m *Markers) Marker() (marker Marker) + func (m *Markers) Merge(markers *Markers) + func (m *Markers) Set(sequenceID SequenceID, index Index) (updated, added bool) + func (m *Markers) Size() (size int) + type ReferencedMarkers struct + func NewReferencedMarkers(markers *Markers) (new *ReferencedMarkers) + func (r *ReferencedMarkers) Add(index Index, referencedMarkers *Markers) + func (r *ReferencedMarkers) Get(index Index) (referencedMarkers *Markers) + func (r *ReferencedMarkers) String() (humanReadableReferencedMarkers string) + type ReferencingMarkers struct + func NewReferencingMarkers() (referencingMarkers *ReferencingMarkers) + func (r *ReferencingMarkers) Add(index Index, referencingMarker Marker) + func (r *ReferencingMarkers) Get(index Index) (referencingMarkers *Markers) + func (r *ReferencingMarkers) String() (humanReadableReferencingMarkers string) + type Sequence struct + func NewSequence(id SequenceID, referencedMarkers *Markers) (new *Sequence) + func (s *Sequence) AddReferencingMarker(index Index, referencingMarker Marker) + func (s *Sequence) HighestIndex() Index + func (s *Sequence) IncreaseHighestIndex(referencedMarkers *Markers) (index Index, increased bool) + func (s *Sequence) LowestIndex() Index + func (s *Sequence) ReferencedMarkers(index Index) *Markers + func (s *Sequence) ReferencingMarkers(index Index) *Markers + func (s *Sequence) TryExtend(referencedPastMarkers *Markers, increaseIndexCallback IncreaseIndexCallback) (index Index, remainingReferencedPastMarkers *Markers, extended bool) + type SequenceID uint64 + func (s *SequenceID) FromBytes(data []byte) (err error) + func (s SequenceID) Bytes() (marshaledSequenceID []byte) + func (s SequenceID) Length() int + func (s SequenceID) String() (humanReadableSequenceID string) + type SequenceIDs map[SequenceID]types.Empty + func NewSequenceIDs(sequenceIDs ...SequenceID) (result SequenceIDs) + func (s SequenceIDs) String() (humanReadableSequenceIDs string) + type StructureDetails struct + func NewStructureDetails() (newStructureDetails *StructureDetails) + func (m *StructureDetails) Clone() (clone *StructureDetails) + func (m *StructureDetails) IsPastMarker() (isPastMarker bool) + func (m *StructureDetails) PastMarkerGap() (pastMarkerGap uint64) + func (m *StructureDetails) PastMarkers() (pastMarkers *Markers) + func (m *StructureDetails) Rank() (rank uint64) + func (m *StructureDetails) SetIsPastMarker(isPastMarker bool) + func (m *StructureDetails) SetPastMarkerGap(pastMarkerGap uint64) + func (m *StructureDetails) SetPastMarkers(pastMarkers *Markers) + func (m *StructureDetails) SetRank(rank uint64)