Documentation ¶
Index ¶
- Constants
- func SequenceAliasMappingFromObjectStorage(key []byte, data []byte) (mapping objectstorage.StorableObject, err error)
- func SequenceFromObjectStorage(key []byte, data []byte) (sequence objectstorage.StorableObject, err error)
- type CachedSequence
- type CachedSequenceAliasMapping
- func (c *CachedSequenceAliasMapping) Consume(consumer func(sequenceAliasMapping *SequenceAliasMapping), ...) (consumed bool)
- func (c *CachedSequenceAliasMapping) Retain() *CachedSequenceAliasMapping
- func (c *CachedSequenceAliasMapping) String() string
- func (c *CachedSequenceAliasMapping) Unwrap() *SequenceAliasMapping
- type IncreaseIndexCallback
- type Index
- type Manager
- func (m *Manager) InheritStructureDetails(referencedStructureDetails []*StructureDetails, ...) (inheritedStructureDetails *StructureDetails, newSequenceCreated bool)
- func (m *Manager) IsInPastCone(earlierStructureDetails *StructureDetails, ...) (isInPastCone types.TriBool)
- func (m *Manager) Shutdown()
- func (m *Manager) UpdateStructureDetails(structureDetailsToUpdate *StructureDetails, markerToInherit *Marker) (futureMarkersUpdated bool, inheritFutureMarkerFurther bool)
- type Marker
- type Markers
- func (m *Markers) Bytes() (marshalMarkers []byte)
- func (m *Markers) Clone() (clonedMarkers *Markers)
- func (m *Markers) Delete(sequenceID SequenceID) (existed bool)
- func (m *Markers) Equals(other *Markers) (equals bool)
- func (m *Markers) FirstMarker() (firstMarker *Marker)
- func (m *Markers) ForEach(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) Merge(markers *Markers)
- func (m *Markers) SequenceIDs() (sequenceIDs SequenceIDs)
- func (m *Markers) SequenceToString() (s string)
- func (m *Markers) Set(sequenceID SequenceID, index Index) (updated bool, added bool)
- func (m *Markers) Size() (size int)
- func (m *Markers) String() (humanReadableMarkers string)
- type ParentReferences
- func NewParentReferences(referencedMarkers *Markers) (newParentReferences *ParentReferences)
- func ParentReferencesFromBytes(parentReferencesBytes []byte) (parentReferences *ParentReferences, consumedBytes int, err error)
- func ParentReferencesFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (parentReferences *ParentReferences, err error)
- func (p *ParentReferences) AddReferences(referencedMarkers *Markers, referencingIndex Index)
- func (p *ParentReferences) Bytes() (marshaledParentReferences []byte)
- func (p *ParentReferences) HighestReferencedMarker(sequenceID SequenceID, referencingIndex Index) (highestReferencedMarker *Marker)
- func (p *ParentReferences) HighestReferencedMarkers(index Index) (highestReferencedMarkers *Markers)
- func (p *ParentReferences) ParentSequences() (parentSequences SequenceIDs)
- func (p *ParentReferences) SequenceIDs() (sequenceIDs SequenceIDs)
- func (p *ParentReferences) String() (humanReadableParentReferences string)
- type Sequence
- func (s *Sequence) Bytes() []byte
- func (s *Sequence) HighestIndex() Index
- func (s *Sequence) HighestReferencedParentMarkers(index Index) *Markers
- func (s *Sequence) ID() SequenceID
- func (s *Sequence) IncreaseHighestIndex(referencedMarkers *Markers) (index Index, increased bool)
- func (s *Sequence) LowestIndex() Index
- func (s *Sequence) ObjectStorageKey() []byte
- func (s *Sequence) ObjectStorageValue() []byte
- func (s *Sequence) ParentSequences() SequenceIDs
- func (s *Sequence) Rank() uint64
- func (s *Sequence) String() string
- func (s *Sequence) Update(other objectstorage.StorableObject)
- type SequenceAlias
- func NewSequenceAlias(bytes []byte) SequenceAlias
- func SequenceAliasFromBase58(base58String string) (aggregatedSequencesID SequenceAlias, err error)
- func SequenceAliasFromBytes(aggregatedSequencesIDBytes []byte) (aggregatedSequencesID SequenceAlias, consumedBytes int, err error)
- func SequenceAliasFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (aggregatedSequencesID SequenceAlias, err error)
- type SequenceAliasMapping
- func (s *SequenceAliasMapping) Bytes() (marshaledSequenceAliasMapping []byte)
- func (s *SequenceAliasMapping) ObjectStorageKey() (objectStorageKey []byte)
- func (s *SequenceAliasMapping) ObjectStorageValue() (objectStorageValue []byte)
- func (s *SequenceAliasMapping) SequenceAlias() (sequenceAlias SequenceAlias)
- func (s *SequenceAliasMapping) SequenceID() (sequenceID SequenceID)
- func (s *SequenceAliasMapping) String() string
- func (s *SequenceAliasMapping) Update(other objectstorage.StorableObject)
- type SequenceID
- type SequenceIDs
- type StructureDetails
Constants ¶
const ( // PrefixSequence defines the storage prefix for the Sequence object storage. PrefixSequence byte = iota // PrefixSequenceAliasMapping defines the storage prefix for the SequenceAliasMapping object storage. PrefixSequenceAliasMapping )
const SequenceAliasLength = 32
SequenceAliasLength contains the amount of bytes that a marshaled version of the SequenceAlias contains.
Variables ¶
This section is empty.
Functions ¶
func SequenceAliasMappingFromObjectStorage ¶
func SequenceAliasMappingFromObjectStorage(key []byte, data []byte) (mapping objectstorage.StorableObject, err error)
SequenceAliasMappingFromObjectStorage restores a SequenceAlias that was stored in the object storage.
func SequenceFromObjectStorage ¶
func SequenceFromObjectStorage(key []byte, data []byte) (sequence objectstorage.StorableObject, err error)
SequenceFromObjectStorage restores an Sequence that was stored in the object storage.
Types ¶
type CachedSequence ¶
type CachedSequence struct {
objectstorage.CachedObject
}
CachedSequence is a wrapper for the generic CachedObject returned by the object storage that overrides the accessor methods with a type-casted one.
func (*CachedSequence) Consume ¶
func (c *CachedSequence) Consume(consumer func(sequence *Sequence), forceRelease ...bool) (consumed bool)
Consume unwraps the CachedObject and passes a type-casted version to the consumer. It automatically releases the object when the consumer finishes and returns true of there was at least one object that was consumed.
func (*CachedSequence) Retain ¶
func (c *CachedSequence) Retain() *CachedSequence
Retain marks this CachedObject to still be in use by the program.
func (*CachedSequence) Unwrap ¶
func (c *CachedSequence) Unwrap() *Sequence
Unwrap is the type-casted equivalent of Get. It returns nil if the object does not exist.
type CachedSequenceAliasMapping ¶
type CachedSequenceAliasMapping struct {
objectstorage.CachedObject
}
CachedSequenceAliasMapping is a wrapper for the generic CachedObject returned by the object storage that overrides the accessor methods with a type-casted one.
func (*CachedSequenceAliasMapping) Consume ¶
func (c *CachedSequenceAliasMapping) Consume(consumer func(sequenceAliasMapping *SequenceAliasMapping), forceRelease ...bool) (consumed bool)
Consume unwraps the CachedObject and passes a type-casted version to the consumer. It automatically releases the object when the consumer finishes and returns true of there was at least one object that was consumed.
func (*CachedSequenceAliasMapping) Retain ¶
func (c *CachedSequenceAliasMapping) Retain() *CachedSequenceAliasMapping
Retain marks this CachedObject to still be in use by the program.
func (*CachedSequenceAliasMapping) String ¶ added in v0.4.1
func (c *CachedSequenceAliasMapping) String() string
String returns a human readable version of the CachedSequenceAliasMapping.
func (*CachedSequenceAliasMapping) Unwrap ¶
func (c *CachedSequenceAliasMapping) Unwrap() *SequenceAliasMapping
Unwrap is the type-casted equivalent of Get. It returns nil if the object does not exist.
type IncreaseIndexCallback ¶
type IncreaseIndexCallback func(sequenceID SequenceID, currentHighestIndex Index) bool
IncreaseIndexCallback is the type of the callback function that is used to determine if a new Index is supposed to be assigned in a given Sequence.
type Index ¶
type Index uint64
Index represents the ever increasing number of the Markers in a Sequence.
func IndexFromBytes ¶
IndexFromBytes unmarshals an Index from a sequence of bytes.
func IndexFromMarshalUtil ¶
func IndexFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (index Index, err error)
IndexFromMarshalUtil unmarshals an Index using a MarshalUtil (for easier unmarshaling).
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the managing entity for the Marker related business logic. It is stateful and automatically stores its state in an underlying KVStore.
func NewManager ¶
NewManager is the constructor of the Manager that takes a KVStore to persist its state.
func (*Manager) InheritStructureDetails ¶
func (m *Manager) InheritStructureDetails(referencedStructureDetails []*StructureDetails, increaseIndexCallback IncreaseIndexCallback, sequenceAlias SequenceAlias) (inheritedStructureDetails *StructureDetails, newSequenceCreated bool)
InheritStructureDetails takes the StructureDetails of the referenced parents and returns new StructureDetails for the message that was just added to the DAG. It automatically creates a new Sequence and Index if necessary and returns an additional flag that indicates if a new Sequence was created.
func (*Manager) IsInPastCone ¶
func (m *Manager) IsInPastCone(earlierStructureDetails *StructureDetails, laterStructureDetails *StructureDetails) (isInPastCone types.TriBool)
IsInPastCone checks if the earlier node is directly or indirectly referenced by the later node in the DAG.
func (*Manager) Shutdown ¶
func (m *Manager) Shutdown()
Shutdown shuts down the Manager and persists its state.
func (*Manager) UpdateStructureDetails ¶
func (m *Manager) UpdateStructureDetails(structureDetailsToUpdate *StructureDetails, markerToInherit *Marker) (futureMarkersUpdated bool, inheritFutureMarkerFurther bool)
UpdateStructureDetails updates the StructureDetails of an existing node in the DAG by propagating new Markers of its children into its future Markers. It returns two boolean flags that indicate if the future Markers were updated and if the new Marker should be propagated further to the parents of the given node.
type Marker ¶
type Marker struct {
// contains filtered or unexported fields
}
Marker represents a coordinate in a Sequence that is identified by an ever increasing Index.
func MarkerFromBytes ¶
MarkerFromBytes unmarshals a Marker from a sequence of bytes.
func MarkerFromMarshalUtil ¶
func MarkerFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (marker *Marker, err error)
MarkerFromMarshalUtil unmarshals a Marker using a MarshalUtil (for easier unmarshaling).
func NewMarker ¶ added in v0.4.0
func NewMarker(sequenceID SequenceID, index Index) *Marker
NewMarker returns a new marker.
func (*Marker) SequenceID ¶
func (m *Marker) SequenceID() (sequenceID SequenceID)
SequenceID returns the identifier of the Sequence of the Marker.
type Markers ¶
type Markers struct {
// contains filtered or unexported fields
}
Markers represents a collection of Markers that can contain exactly one Index per SequenceID.
func FromMarshalUtil ¶
func FromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (markers *Markers, err error)
FromMarshalUtil unmarshals a collection of Markers using a MarshalUtil (for easier unmarshaling).
func NewMarkers ¶
NewMarkers creates a new collection of Markers.
func (*Markers) Delete ¶
func (m *Markers) Delete(sequenceID SequenceID) (existed bool)
Delete removes the Marker with the given SequenceID from the collection and returns a boolean flag that indicates if the element existed.
func (*Markers) FirstMarker ¶
FirstMarker returns the first Marker in the collection. It can for example be used to retrieve the new Marker that was assigned when increasing the Index of a Sequence.
func (*Markers) ForEach ¶
func (m *Markers) ForEach(iterator func(sequenceID SequenceID, index Index) bool) (success bool)
ForEach calls the iterator for each of the contained Markers. The iteration is aborted if the iterator returns false. The method returns false if the iteration was aborted.
func (*Markers) Get ¶
func (m *Markers) Get(sequenceID SequenceID) (index Index, exists bool)
Get returns the Index of the Marker with the given Sequence and a flag that indicates if the Marker exists.
func (*Markers) HighestIndex ¶
HighestIndex returns the the highest Index of all Markers in the collection.
func (*Markers) LowestIndex ¶
LowestIndex returns the the lowest Index of all Markers in the collection.
func (*Markers) Merge ¶
Merge takes the given Markers and adds them to the collection (overwriting Markers with a lower Index if there are existing Markers with the same SequenceID).
func (*Markers) SequenceIDs ¶
func (m *Markers) SequenceIDs() (sequenceIDs SequenceIDs)
SequenceIDs returns the SequenceIDs that are having Markers in this collection.
func (*Markers) SequenceToString ¶ added in v0.5.3
SequenceToString returns a string in the form sequenceID:index;.
func (*Markers) Set ¶
func (m *Markers) Set(sequenceID SequenceID, index Index) (updated bool, added bool)
Set adds a new Marker to the collection and updates the Index of an existing entry if it is higher than a possible previously stored one. The method returns two boolean flags that indicate if an entry was updated and/or added.
type ParentReferences ¶
type ParentReferences struct {
// contains filtered or unexported fields
}
ParentReferences models the relationship between Sequences by providing a way to encode which Marker references which other Markers of other Sequences.
func NewParentReferences ¶
func NewParentReferences(referencedMarkers *Markers) (newParentReferences *ParentReferences)
NewParentReferences creates a new set of ParentReferences.
func ParentReferencesFromBytes ¶
func ParentReferencesFromBytes(parentReferencesBytes []byte) (parentReferences *ParentReferences, consumedBytes int, err error)
ParentReferencesFromBytes unmarshals a ParentReferences from a sequence of bytes.
func ParentReferencesFromMarshalUtil ¶
func ParentReferencesFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (parentReferences *ParentReferences, err error)
ParentReferencesFromMarshalUtil unmarshals a ParentReferences object using a MarshalUtil (for easier unmarshaling).
func (*ParentReferences) AddReferences ¶
func (p *ParentReferences) AddReferences(referencedMarkers *Markers, referencingIndex Index)
AddReferences adds referenced Markers to the ParentReferences.
func (*ParentReferences) Bytes ¶
func (p *ParentReferences) Bytes() (marshaledParentReferences []byte)
Bytes returns a marshaled version of the ParentReferences.
func (*ParentReferences) HighestReferencedMarker ¶
func (p *ParentReferences) HighestReferencedMarker(sequenceID SequenceID, referencingIndex Index) (highestReferencedMarker *Marker)
HighestReferencedMarker returns the referenced Marker with the highest Index of a given Sequence.
func (*ParentReferences) HighestReferencedMarkers ¶
func (p *ParentReferences) HighestReferencedMarkers(index Index) (highestReferencedMarkers *Markers)
HighestReferencedMarkers returns a collection of Markers that were referenced by the given Index.
func (*ParentReferences) ParentSequences ¶
func (p *ParentReferences) ParentSequences() (parentSequences SequenceIDs)
ParentSequences returns the parent Sequences of the ParentReferences.
func (*ParentReferences) SequenceIDs ¶
func (p *ParentReferences) SequenceIDs() (sequenceIDs SequenceIDs)
SequenceIDs returns the SequenceIDs of all referenced Sequences (and not just the parents in the Sequence DAG).
func (*ParentReferences) String ¶
func (p *ParentReferences) String() (humanReadableParentReferences string)
String returns a human readable version of the ParentReferences.
type Sequence ¶
type Sequence struct { objectstorage.StorableObjectFlags // contains filtered or unexported fields }
Sequence represents a set of ever increasing Indexes that are encapsulating a certain part of the DAG.
func NewSequence ¶
func NewSequence(id SequenceID, referencedMarkers *Markers, rank uint64) *Sequence
NewSequence creates a new Sequence from the given details.
func SequenceFromBytes ¶
SequenceFromBytes unmarshals a Sequence from a sequence of bytes.
func SequenceFromMarshalUtil ¶
func SequenceFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (sequence *Sequence, err error)
SequenceFromMarshalUtil unmarshals a Sequence using a MarshalUtil (for easier unmarshaling).
func (*Sequence) HighestIndex ¶
HighestIndex returns the Index of the latest Marker in the Sequence.
func (*Sequence) HighestReferencedParentMarkers ¶
HighestReferencedParentMarkers returns a collection of Markers that were referenced by the given Index.
func (*Sequence) IncreaseHighestIndex ¶
IncreaseHighestIndex increases the highest Index of the Sequence if the referencedMarkers directly reference the Marker with the currently highest Index. It returns the new Index and a boolean flag that indicates if the value was increased.
func (*Sequence) LowestIndex ¶
LowestIndex returns the Index of the very first Marker in the Sequence.
func (*Sequence) ObjectStorageKey ¶
ObjectStorageKey returns the key that is used to store the object in the database. It is required to match the StorableObject interface.
func (*Sequence) ObjectStorageValue ¶
ObjectStorageValue marshals the Sequence into a sequence of bytes. The ID is not serialized here as it is only used as a key in the object storage.
func (*Sequence) ParentSequences ¶
func (s *Sequence) ParentSequences() SequenceIDs
ParentSequences returns the SequenceIDs of the parent Sequences in the Sequence DAG.
func (*Sequence) Rank ¶
Rank returns the rank of the Sequence (maximum distance from the root of the Sequence DAG).
func (*Sequence) Update ¶
func (s *Sequence) Update(other objectstorage.StorableObject)
Update is required to match the StorableObject interface but updates of the object are disabled.
type SequenceAlias ¶
type SequenceAlias [SequenceAliasLength]byte
SequenceAlias represents an alternative identifier for a Sequence that is used to look up the SequenceID.
func NewSequenceAlias ¶
func NewSequenceAlias(bytes []byte) SequenceAlias
NewSequenceAlias creates a new custom identifier from a sequence of bytes.
func SequenceAliasFromBase58 ¶
func SequenceAliasFromBase58(base58String string) (aggregatedSequencesID SequenceAlias, err error)
SequenceAliasFromBase58 creates a SequenceAlias from a base58 encoded string.
func SequenceAliasFromBytes ¶
func SequenceAliasFromBytes(aggregatedSequencesIDBytes []byte) (aggregatedSequencesID SequenceAlias, consumedBytes int, err error)
SequenceAliasFromBytes unmarshals a SequenceAlias from a sequence of bytes.
func SequenceAliasFromMarshalUtil ¶
func SequenceAliasFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (aggregatedSequencesID SequenceAlias, err error)
SequenceAliasFromMarshalUtil unmarshals a SequenceAlias using a MarshalUtil (for easier unmarshaling).
func (SequenceAlias) Base58 ¶
func (a SequenceAlias) Base58() (base58EncodedSequenceAlias string)
Base58 returns a base58 encoded version of the SequenceAlias.
func (SequenceAlias) Bytes ¶
func (a SequenceAlias) Bytes() (marshaledSequenceAlias []byte)
Bytes returns a marshaled version of the SequenceAlias.
func (SequenceAlias) Merge ¶
func (a SequenceAlias) Merge(alias SequenceAlias) (mergedSequenceAlias SequenceAlias)
Merge generates a new unique SequenceAlias from the combination of two SequenceAliases.
func (SequenceAlias) String ¶
func (a SequenceAlias) String() (humanReadableSequenceAlias string)
String returns a human readable version of the SequenceAlias.
type SequenceAliasMapping ¶
type SequenceAliasMapping struct { objectstorage.StorableObjectFlags // contains filtered or unexported fields }
SequenceAliasMapping represents the mapping between a SequenceAlias and its SequenceID.
func SequenceAliasMappingFromBytes ¶
func SequenceAliasMappingFromBytes(mappingBytes []byte) (mapping *SequenceAliasMapping, consumedBytes int, err error)
SequenceAliasMappingFromBytes unmarshals a SequenceAliasMapping from a sequence of bytes.
func SequenceAliasMappingFromMarshalUtil ¶
func SequenceAliasMappingFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (mapping *SequenceAliasMapping, err error)
SequenceAliasMappingFromMarshalUtil unmarshals a SequenceAliasMapping using a MarshalUtil (for easier unmarshaling).
func (*SequenceAliasMapping) Bytes ¶
func (s *SequenceAliasMapping) Bytes() (marshaledSequenceAliasMapping []byte)
Bytes returns a marshaled version of the SequenceAliasMapping.
func (*SequenceAliasMapping) ObjectStorageKey ¶
func (s *SequenceAliasMapping) ObjectStorageKey() (objectStorageKey []byte)
ObjectStorageKey returns the key that is used to store the object in the database. It is required to match the StorableObject interface.
func (*SequenceAliasMapping) ObjectStorageValue ¶
func (s *SequenceAliasMapping) ObjectStorageValue() (objectStorageValue []byte)
ObjectStorageValue marshals the Transaction into a sequence of bytes. The ID is not serialized here as it is only used as a key in the object storage.
func (*SequenceAliasMapping) SequenceAlias ¶
func (s *SequenceAliasMapping) SequenceAlias() (sequenceAlias SequenceAlias)
SequenceAlias returns the SequenceAlias of SequenceAliasMapping.
func (*SequenceAliasMapping) SequenceID ¶
func (s *SequenceAliasMapping) SequenceID() (sequenceID SequenceID)
SequenceID returns the SequenceID of the SequenceAliasMapping.
func (*SequenceAliasMapping) String ¶ added in v0.4.1
func (s *SequenceAliasMapping) String() string
func (*SequenceAliasMapping) Update ¶
func (s *SequenceAliasMapping) Update(other objectstorage.StorableObject)
Update is required to match the StorableObject interface but updates of the object are disabled.
type SequenceID ¶
type SequenceID uint64
SequenceID is the type of the identifier of a Sequence.
func SequenceIDFromBytes ¶
func SequenceIDFromBytes(sequenceIDBytes []byte) (sequenceID SequenceID, consumedBytes int, err error)
SequenceIDFromBytes unmarshals a SequenceID from a sequence of bytes.
func SequenceIDFromMarshalUtil ¶
func SequenceIDFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (sequenceID SequenceID, err error)
SequenceIDFromMarshalUtil unmarshals a SequenceIDs using a MarshalUtil (for easier unmarshaling).
func (SequenceID) Bytes ¶
func (a SequenceID) Bytes() (marshaledSequenceID []byte)
Bytes returns a marshaled version of the SequenceID.
func (SequenceID) String ¶
func (a SequenceID) String() (humanReadableSequenceID string)
String returns a human readable version of the SequenceID.
type SequenceIDs ¶
type SequenceIDs map[SequenceID]types.Empty
SequenceIDs represents a collection of SequenceIDs.
func NewSequenceIDs ¶
func NewSequenceIDs(sequenceIDs ...SequenceID) (result SequenceIDs)
NewSequenceIDs creates a new collection of SequenceIDs.
func SequenceIDsFromBytes ¶
func SequenceIDsFromBytes(sequenceIDBytes []byte) (sequenceIDs SequenceIDs, consumedBytes int, err error)
SequenceIDsFromBytes unmarshals a collection of SequenceIDs from a sequence of bytes.
func SequenceIDsFromMarshalUtil ¶
func SequenceIDsFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (sequenceIDs SequenceIDs, err error)
SequenceIDsFromMarshalUtil unmarshals a collection of SequenceIDs using a MarshalUtil (for easier unmarshaling).
func (SequenceIDs) Alias ¶
func (s SequenceIDs) Alias() (aggregatedSequencesID SequenceAlias)
Alias returns the SequenceAlias of the SequenceIDs. The SequenceAlias is used to address the numerical Sequences in the object storage.
func (SequenceIDs) Bytes ¶
func (s SequenceIDs) Bytes() (marshaledSequenceIDs []byte)
Bytes returns a marshaled version of the SequenceIDs.
func (SequenceIDs) String ¶
func (s SequenceIDs) String() (humanReadableSequenceIDs string)
String returns a human readable version of the SequenceIDs.
type StructureDetails ¶
type StructureDetails struct { Rank uint64 IsPastMarker bool PastMarkers *Markers FutureMarkers *Markers // contains filtered or unexported fields }
StructureDetails represents a container for the complete Marker related information of a node in a DAG that are used to interact with the public API of this package.
func StructureDetailsFromBytes ¶
func StructureDetailsFromBytes(markersBytes []byte) (markersPair *StructureDetails, consumedBytes int, err error)
StructureDetailsFromBytes unmarshals a StructureDetails object from a sequence of bytes.
func StructureDetailsFromMarshalUtil ¶
func StructureDetailsFromMarshalUtil(marshalUtil *marshalutil.MarshalUtil) (markersPair *StructureDetails, err error)
StructureDetailsFromMarshalUtil unmarshals a StructureDetails using a MarshalUtil (for easier unmarshaling).
func (*StructureDetails) Bytes ¶
func (m *StructureDetails) Bytes() (marshaledStructureDetails []byte)
Bytes returns a marshaled version of the StructureDetails.
func (*StructureDetails) Clone ¶
func (m *StructureDetails) Clone() (clone *StructureDetails)
Clone creates a deep copy of the StructureDetails.
func (*StructureDetails) String ¶
func (m *StructureDetails) String() (humanReadableStructureDetails string)
String returns a human readable version of the StructureDetails.