InMemoryTxArtifactSource

org.sigilaris.node.gossip.tx.InMemoryTxArtifactSource
See theInMemoryTxArtifactSource companion object
final class InMemoryTxArtifactSource[F[_], A] extends GossipArtifactSource[F, A]

In-memory implementation of GossipArtifactSource for transaction artifacts, primarily for testing.

Type parameters

A

the artifact payload type

F

the effect type

Attributes

Companion
object
Source
InMemoryTxArtifacts.scala
Graph
Supertypes
trait GossipArtifactSource[F, A]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def append(chainId: ChainId, payload: A, ts: Instant): F[GossipEvent[A]]

Appends a new transaction payload to the in-memory source.

Appends a new transaction payload to the in-memory source.

Value parameters

chainId

the chain to append to

payload

the artifact payload

ts

the event timestamp

Attributes

Returns

the generated gossip event

Source
InMemoryTxArtifacts.scala
override def readAfter(chainId: ChainId, topic: GossipTopic, cursor: Option[CursorToken]): F[Either[CanonicalRejection, Vector[AvailableGossipEvent[A]]]]

Reads available events after the given cursor position.

Reads available events after the given cursor position.

Value parameters

chainId

the chain to read from

cursor

optional cursor; None starts from the beginning

topic

the gossip topic

Attributes

Returns

events after the cursor, or a rejection on error

Definition Classes
Source
InMemoryTxArtifacts.scala
override def readByIds(chainId: ChainId, topic: GossipTopic, ids: Vector[StableArtifactId]): F[Vector[AvailableGossipEvent[A]]]

Reads events by their stable artifact identifiers.

Reads events by their stable artifact identifiers.

Value parameters

chainId

the chain to read from

ids

the artifact identifiers to look up

topic

the gossip topic

Attributes

Returns

the matching available events

Definition Classes
Source
InMemoryTxArtifacts.scala
def snapshot(chainId: ChainId): F[Vector[GossipEvent[A]]]

Returns all stored events for the given chain.

Returns all stored events for the given chain.

Value parameters

chainId

the chain to snapshot

Attributes

Returns

all stored events for the chain

Source
InMemoryTxArtifacts.scala