28 lines
652 B
Markdown
28 lines
652 B
Markdown
# Event Interfaces
|
|
|
|
Event streaming interfaces.
|
|
|
|
## IEventStreamStore
|
|
|
|
```csharp
|
|
public interface IEventStreamStore
|
|
{
|
|
Task AppendAsync(string streamName, object @event, CancellationToken ct = default);
|
|
IAsyncEnumerable<StreamEvent> ReadStreamAsync(string streamName, long fromOffset, CancellationToken ct = default);
|
|
}
|
|
```
|
|
|
|
## IEventSubscriptionService
|
|
|
|
```csharp
|
|
public interface IEventSubscriptionService
|
|
{
|
|
Task<IAsyncDisposable> SubscribeAsync(string streamName, Func<StreamEvent, Task> handler, CancellationToken ct = default);
|
|
}
|
|
```
|
|
|
|
## See Also
|
|
|
|
- [API Reference Overview](README.md)
|
|
- [Event Streaming](../event-streaming/README.md)
|