StreamsSyntax

class Object
trait Matchable
class Any
trait ApiSyntax
trait AllSyntax
object all
object api

Extensions

Extensions

extension (s: Streams[F])
def readAllBackwards[F[_]](from: LogPosition, maxCount: Long, resolveLinkTos: Boolean): Stream[F, AllEvent]

Read events backwards from the global stream, sec.StreamId.All.

Read events backwards from the global stream, sec.StreamId.All.

Value Params
from

log position to read from.

maxCount

limits maximum events returned.

resolveLinkTos

whether to resolve EventType.LinkTo events automatically.

Returns

a Stream that emits AllEvent values.

def readAllForwards[F[_]](from: LogPosition, maxCount: Long, resolveLinkTos: Boolean): Stream[F, AllEvent]

Read events forwards from the global stream, sec.StreamId.All.

Read events forwards from the global stream, sec.StreamId.All.

Value Params
from

log position to read from.

maxCount

limits maximum events returned.

resolveLinkTos

whether to resolve EventType.LinkTo events automatically.

Returns

a Stream that emits AllEvent values.

def readStreamBackwards[F[_]](streamId: StreamId, from: StreamPosition, maxCount: Long, resolveLinkTos: Boolean): Stream[F, StreamEvent]

Read events backwards from an individual stream. A sec.api.exceptions.StreamNotFound is raised when the stream does not exist.

Read events backwards from an individual stream. A sec.api.exceptions.StreamNotFound is raised when the stream does not exist.

Value Params
from

stream position to read from.

maxCount

limits maximum events returned.

resolveLinkTos

whether to resolve EventType.LinkTo events automatically.

streamId

the id of the stream to read from.

Returns

a Stream that emits StreamEvent values.

def readStreamForwards[F[_]](streamId: StreamId, from: StreamPosition, maxCount: Long, resolveLinkTos: Boolean): Stream[F, StreamEvent]

Read events forwards from an individual stream. A sec.api.exceptions.StreamNotFound is raised when the stream does not exist.

Read events forwards from an individual stream. A sec.api.exceptions.StreamNotFound is raised when the stream does not exist.

Value Params
from

stream position to read from.

maxCount

limits maximum events returned.

resolveLinkTos

whether to resolve EventType.LinkTo events automatically.

streamId

the id of the stream to read from.

Returns

a Stream that emits StreamEvent values.

def subscribeToAll[F[_]](exclusiveFrom: Option[LogPosition]): Stream[F, AllEvent]

Subscribes to the global stream, StreamId.All without resolving EventType.LinkTo events.

Subscribes to the global stream, StreamId.All without resolving EventType.LinkTo events.

Value Params
exclusiveFrom

position to start from. Use None to subscribe from the beginning.

Returns

a Stream that emits AllEvent values.

def subscribeToAll[F[_]](exclusiveFrom: Option[LogPosition], filterOptions: SubscriptionFilterOptions): Stream[F, Either[Checkpoint, AllEvent]]

Subscribes to the global stream, StreamId.All using a subscription filter without resolving EventType.LinkTo events.

Subscribes to the global stream, StreamId.All using a subscription filter without resolving EventType.LinkTo events.

Value Params
exclusiveFrom

log position to start from. Use None to subscribe from the beginning.

filterOptions

to use when subscribing - See sec.api.SubscriptionFilterOptions.

Returns

a Stream that emits either Checkpoint or AllEvent values. How frequent Checkpoint is emitted depends on filterOptions.

def subscribeToStream[F[_]](streamId: StreamId, exclusiveFrom: Option[StreamPosition]): Stream[F, StreamEvent]

Subscribes to an individual stream without resolving EventType.LinkTo events.

Subscribes to an individual stream without resolving EventType.LinkTo events.

Value Params
exclusiveFrom

stream position to start from. Use None to subscribe from the beginning.

streamId

the id of the stream to subscribe to.

Returns

a Stream that emits StreamEvent values.