eventsource-stub-store-1.0.2: An in-memory stub store implementation.

Copyright(C) 2016 Yorick Laupa
License(see the file LICENSE)
MaintainerYorick Laupa <yo.eight@gmail.com>
Stabilityprovisional
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

EventSource.Store.Stub

Description

This module exposes an implementation of Store for testing purpose. This implementation is threadsafe.

Synopsis

Documentation

data Stream Source #

Holds stream state data.

newStub :: IO StubStore Source #

Creates a new stub event store.

streams :: StubStore -> IO (Map StreamName Stream) Source #

Returns current StubStore streams state.

subscriptionIds :: StubStore -> StreamName -> IO [SubscriptionId] Source #

Returns all subscriptions a stream has.

lastStreamEvent :: StubStore -> StreamName -> IO (Maybe SavedEvent) Source #

Returns the last event of stream.