The main trait that implementations of an event source need to extend.
Trait that implementations of an event source need to extend where the sequence number is just a long.
Trait that implementations of an event source need to extend where the sequence number is just a long.
The key against which values are stored.
Values to be store
Data-type that represents an operation that can be saved to an EventSource.API
.
Data-type that represents an operation that can be saved to an EventSource.API
.
This type represents conditionally applied transformations of the data, so it is possible to have check-then-act semantics for all updates, including insert only if absent, and replace if value matches.
There is syntax for creating Operations, eg. "foo".insertOp
and deleteOp
that
is accessible via import Operation.syntax._
Transform essentially wraps a function from Option[A] => Option[A], but adds a little structure so that it can be stored easily in a commit object.
An event source is an append-only store of data.
An event source is an append-only store of data. Data is represented as a series of events that when replayed in order provides a view of the data at that point in time.
In this implementation, an event is represented by a Transform that is contained within an event (strictly speaking a Event could contain a series of Transforms, but we're not doing that here to keep things simple).
To implement an event source, one needs to:
TODO - make EventSource sit on top of EventStream
The main trait that implementations of an event source need to extend.
The key against which values are stored.
Values to be store
Type of the sequence. Needs to have a Sequence type class implementation.