Package io.github.alexandrepiveteau.echo
Types
A mutable version of Site, which allows the insertion of the events T through its event method. Each MutableSite is associated with a globally unique SiteIdentifier, which will be used when yielding events.
An interface defining an asymmetrical replication site, biased towards receiving data.
An interface defining an asymmetrical replication site, biased towards sending data.
An interface describing a Site in the distributed system. When collected, it will emit the latest aggregated model.
An enumeration defining the strategy that will implement the replication protocol. A SyncStrategy defines the behavior for both sides of the replication protocol.
Functions
Returns the ReceiveExchange.
Returns the SendExchange.
Creates a new Exchange with a backing event log.
Transforms an Exchange by making it flow on a specific dispatcher. The same CoroutineContext will be used in both directions for the communicating Flows.
Transforms a MutableSite by making it flow on a specific dispatcher. The same CoroutineContext will be used in both directions for the communicating Flows.
Transforms a MutableSite to make it return a different kind of model. This may be particularly useful when creating abstractions backed by a MutableSite that should not expose some implementation details.
Creates a new MutableSite for the provided SiteIdentifier, with a backing log. Additionally, this overload takes a OneWayProjection and lets you specify a projection to apply to the data, to have custom MutableSite.event arguments.
Creates a new MutableSite for the provided SiteIdentifier, with a backing history. The current model value of the site will always be Unit, since it does not perform aggregations.
Creates a new MutableSite for the provided SiteIdentifier, with a backing mutable history. Additionally, this overload takes a OneWayProjection and lets you specify a projection to apply to the data, to have custom MutableSite.event arguments.
Creates a new MutableSite for the provided SiteIdentifier, with a backing log. Additionally, this overload takes a TwoWayProjection and lets you specify a projection to apply to the data, to have custom MutableSite.event arguments.
Creates a new MutableSite for the provided SiteIdentifier, with a backing mutable history. Additionally, this overload takes a TwoWayProjection and lets you specify a projection to apply to the data, to have custom MutableSite.event arguments.
Creates a new MutableSite for the provided SiteIdentifier, with a backing mutable history.
Creates a new Site with a backing history.
Creates a new Site for the provided SiteIdentifier, with a backing log.
Creates a new Site for the provided SiteIdentifier, with a backing log. Additionally, this overload takes a OneWayProjection and lets you specify a projection to apply to the data.
Creates a new Site for the provided SiteIdentifier, with a backing log. Additionally, this overload takes a TwoWayProjection and lets you specify a projection to apply to the data.
Syncs the provided Exchange until they are all done communicating. The sync operator creates a chain of Exchange, and for each pair of the chain, some flows that are then used for communication until all the data is eventually synced.
Syncs the provided bidirectional flows until they are done communicating. The sync operator creates bidirectional communication between the two Flow generator functions.