Documentation ¶
Overview ¶
Package version contains types and utilites to deal with Optimistic Concurrency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Any = CheckAny{}
Any avoids optimistic concurrency checks when requiring a version.Check instance.
var SelectFromBeginning = Selector{From: 0}
SelectFromBeginning is a Selector value that will return all Domain Events in an Event Stream.
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check interface {
// contains filtered or unexported methods
}
Check can be used to perform optimistic concurrency checks when writing to the Event Store using the event.Appender interface.
type CheckAny ¶
type CheckAny struct{}
CheckAny is a Check variant that will avoid optimistic concurrency checks when used.
type CheckExact ¶
type CheckExact Version
CheckExact is a Check variant that will ensure the specified version is the current one (typically used when needing to check the version of an Event Stream).
type ConflictError ¶
ConflictError is an error returned by an Event Store when appending some events using an expected Event Stream version that does not match the current state of the Event Stream.
func (ConflictError) Error ¶
func (err ConflictError) Error() string