Safe Haskell | None |
---|---|
Language | Haskell2010 |
Strategies for saving subscription position.
Synopsis
- type LastPositionSaved = GlobalPosition
- type CurrentPosition = GlobalPosition
- type PositionSaved = GlobalPosition
- data PositionStrategy = PositionStrategy {
- restore :: IO GlobalPosition
- save :: LastPositionSaved -> CurrentPosition -> IO (Maybe PositionSaved)
- dontSave :: PositionStrategy
- newtype PositionUpdateInterval = PositioUpdateInterval {}
- writeToStream :: WithConnection -> PositionUpdateInterval -> StreamName -> PositionStrategy
Documentation
type LastPositionSaved = GlobalPosition Source #
type CurrentPosition = GlobalPosition Source #
type PositionSaved = GlobalPosition Source #
data PositionStrategy Source #
Strategy for saving and restoring a subscription's position.
dontSave :: PositionStrategy Source #
Start at zero and don't ever save the position.
newtype PositionUpdateInterval Source #
Minimum difference between the current position and last position saved to save the position.
Instances
writeToStream :: WithConnection -> PositionUpdateInterval -> StreamName -> PositionStrategy Source #
Write the subscription's position to a stream.