feat(browser): stream bounded live session updates (#26)
This commit is contained in:
@@ -7,18 +7,25 @@ namespace FinalFactory.Rendezvous.Tests.Browser;
|
||||
|
||||
internal sealed class SessionBrowserFixture : IDisposable
|
||||
{
|
||||
private readonly EphemeralStateFixture _state = new();
|
||||
private readonly EphemeralStateFixture _state;
|
||||
|
||||
public SessionBrowserFixture()
|
||||
{
|
||||
Changes = new(new SessionChangeJournalOptions());
|
||||
_state = new(changes: Changes);
|
||||
Cursors = new();
|
||||
Browser = new(_state.Store, Cursors, _state.Clock);
|
||||
StreamCursors = new();
|
||||
Browser = new(_state.Store, Cursors, StreamCursors, Changes, _state.Clock);
|
||||
Streams = new(Changes, StreamCursors, _state.Clock);
|
||||
}
|
||||
|
||||
public InMemoryEphemeralRendezvousStore Store => _state.Store;
|
||||
public ManualRendezvousClock Clock => _state.Clock;
|
||||
public SessionBrowserCursorCodec Cursors { get; }
|
||||
public SessionStreamCursorCodec StreamCursors { get; }
|
||||
public SessionChangeJournal Changes { get; }
|
||||
public SessionBrowserService Browser { get; }
|
||||
public SessionStreamService Streams { get; }
|
||||
public TenantScope Scope => _state.Scope;
|
||||
|
||||
public StoredListing Add(
|
||||
@@ -67,5 +74,9 @@ internal sealed class SessionBrowserFixture : IDisposable
|
||||
PageSize = pageSize,
|
||||
};
|
||||
|
||||
public void Dispose() => Cursors.Dispose();
|
||||
public void Dispose()
|
||||
{
|
||||
Cursors.Dispose();
|
||||
StreamCursors.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user