EventStoreStreamsClient class
- Inheritance
-
- Mixed in types
-
Methods
-
$createChannel(EndPoint endPoint)
→ GrpcOrGrpcWebClientChannel
-
inherited
-
$getClient()
→ Future<StreamsClient>
-
inherited
-
$toEnumerator(ResponseStream<ReadResp> stream, StreamState expected)
→ Future<ReadEnumerator<ReadResp>>
-
inherited
-
append(StreamState state, Stream<EventData> events, {UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<WriteResult>
-
Append
events
to stream given by state
.
Returns as WriteResult
when the operation has completed.
If a concurrent write has occurred, a WrongExpectedVersionResult
is returned. Otherwise, WriteSuccessResult is returned.
inherited
-
delete(StreamState state, {UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<DeleteResult>
-
Perform a soft delete of all events in stream.
When a stream is soft-deleted, all events from the stream get
scavenged during the next scavenging run. It means that you can
reopen the stream by appending to it again.
See deleting streams and events
inherited
-
discover()
→ Future<EndPoint>
-
Discover node
EndPoint
given current
EventStoreClientSettings.nodePreference.
inherited
-
getStreamMetadata(String streamId, {UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<StreamMetadataResult>
-
Reads the metadata for stream given by
streamId
inherited
-
isBatchAppendSupported()
→ bool
-
Check if
EventStoreClientSetting.BatchAppend
is supported by EventStoreClientSettings.apiVersion
in current settings.
inherited
-
isFeatureSupported(ApiFeature feature)
→ bool
-
Check if given
feature
is supported by api.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
read(String streamId, {int? maxCount, bool forward = true, bool resolveLinks = true, Position? position, UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<ReadEventsResult>
-
Read ResolvedEvents from given stream
streamId
and optional position
.
When position
is not given, all events from StreamPosition.start
is returned when forward
is true and StreamPosition.end when
forward
is false.
Use maxCount
to limit number of events to read (default is all events
from given position).
Use forward
to read towards the end of stream. Default is true.
Use resolveLinks
to resolve links as ResolvedEvent (default is true).
Returns as ReadEventsResult
on first response from the server.
inherited
-
readFromAll({int? maxCount, bool forward = true, LogPosition? position, bool resolveLinks = true, UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<ReadEventsResult>
-
Read all ResolvedEvents in EventStore from optional
position
. When
position
is not given, all events from LogPosition.start is
returned when forward
is true and StreamPosition.end when
forward
is false.
Use maxCount
to limit number of events to read (default is all events
from given position).
Use forward
to read towards the end of stream. Default is true.
Use resolveLinks
to resolve links as ResolvedEvent (default is true).
Returns as ReadEventsResult
on first response from the server.
inherited
-
setStreamMetadata(StreamState state, StreamMetadata metadata, {UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<WriteResult>
-
Sets the metadata for stream given by
state
.
Returns as WriteResult
when the operation has completed.
If a concurrent write has occurred, a WrongExpectedVersionResult
is returned. Otherwise, WriteSuccessResult is returned.
inherited
-
shutdown()
→ Future<void>
-
Shutdown all channels
inherited
-
subscribe(String streamId, {Position? position, bool resolveLinks = false, UserCredentials? userCredentials, SubscriptionResolvedEventCallback? onEventAppeared, SubscriptionDroppedCallback? onSubscriptionDropped, EventStoreClientOperationOptions? operationOptions})
→ Future<EventStreamSubscription>
-
Subscribe to ResolvedEvents from given stream
streamId
.
inherited
-
subscribeToAll({LogPosition? position, bool resolveLinks = false, UserCredentials? userCredentials, SubscriptionFilterOptions? filterOptions, SubscriptionResolvedEventCallback? onEventAppeared, SubscriptionDroppedCallback? onSubscriptionDropped, EventStoreClientOperationOptions? operationOptions})
→ Future<EventStreamSubscription>
-
Subscribe to all ResolvedEvents.
inherited
-
tombstone(StreamState state, {UserCredentials? userCredentials, EventStoreClientOperationOptions? operationOptions})
→ Future<DeleteResult>
-
Perform a hard delete of stream.
When using hard delete, the stream gets closed with a tombstone event.
Such an event tells the database that the stream cannot be reopened,
so any attempt to append to the hard-deleted stream will fail.
See deleting streams and events
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
-
verify()
→ Future<void>
-
Verify that EventStoreClientSettings.apiVersion
is compatible with server version. Throws a
UnsupportedApiVersionException if
MemberInfo.apiVersion is incompatible with
requested EventStoreClientSettings.apiVersion.
inherited