Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventStoreReader ¶
type Repo ¶
type Repo struct { eh.ReadWriteRepo // contains filtered or unexported fields }
Repo is a middleware that adds version checking to a read repository.
func IntoRepo ¶
IntoRepo tries to convert an eh.ReadRepo into a Repo by recursively looking at inner repos. Returns nil if none was found.
func NewRepo ¶
func NewRepo(repo eh.ReadWriteRepo, eventStore EventStoreReader) *Repo
NewRepo creates a new Repo. Uses the supplied event store to find the min version number of a given stream/aggregate
func (*Repo) Find ¶
Find implements the Find method of the eventhorizon.ReadModel interface. If the context contains a min version set by WithMinVersion it will only return an item if its version is at least min version. If a timeout or deadline is set on the context it will repeatedly try to get the item until either the version matches or the deadline is reached.