stream_revision

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsReadPositionAll

type IsReadPositionAll interface {
	// contains filtered or unexported methods
}

IsReadPositionAll interface is used when we want to specify starting read position when we want to read events form $all stream. Currently, we can use ReadPositionAll, ReadPositionAllStart and ReadPositionAllEnd.

type IsReadStreamRevision

type IsReadStreamRevision interface {
	// contains filtered or unexported methods
}

IsReadStreamRevision interface is used when we want to read events from a stream. Currently, we can use ReadStreamRevision, ReadStreamRevisionStart and ReadStreamRevisionEnd.

type IsWriteStreamRevision

type IsWriteStreamRevision interface {
	// contains filtered or unexported methods
}

IsWriteStreamRevision interface is used to specify stream's expected revision when we want to alter a state of the stream. Currently, we can use WriteStreamRevision, WriteStreamRevisionNoStream, WriteStreamRevisionAny and WriteStreamRevisionStreamExists implementations of this interface.

type ReadPositionAll

type ReadPositionAll struct {
	CommitPosition  uint64
	PreparePosition uint64
}

ReadPositionAll is used when we want to specify exact position from which we want to start to read events from $all stream. Each event written to EventStore has a commit and prepare position.

type ReadPositionAllEnd

type ReadPositionAllEnd struct{}

ReadPositionAllEnd is used when we want to start to read events from the end of $all stream.

type ReadPositionAllStart

type ReadPositionAllStart struct{}

ReadPositionAllStart is used when we want to start to read events from the beginning of $all stream.

type ReadStreamRevision

type ReadStreamRevision struct {
	Revision uint64
}

ReadStreamRevision is used to indicate an exact revision from which we want to start reading

type ReadStreamRevisionEnd

type ReadStreamRevisionEnd struct{}

ReadStreamRevisionEnd is used when we want to start to read events from the end of a stream.

type ReadStreamRevisionStart

type ReadStreamRevisionStart struct{}

ReadStreamRevisionStart is used when we want to start to read events from beginning of a stream.

type WriteStreamRevision

type WriteStreamRevision struct {
	Revision uint64
}

WriteStreamRevision is used to specify exact (finite) expected revision of a stream. Set Revision field to a value you expect as stream's revision.

type WriteStreamRevisionAny

type WriteStreamRevisionAny struct{}

WriteStreamRevisionAny is used when we do not know if stream may or may not exist.

type WriteStreamRevisionNoStream

type WriteStreamRevisionNoStream struct{}

WriteStreamRevisionNoStream is used when stream must not exist. For example, if we use WriteStreamRevisionNoStream when appending events to a stream which exists we will receive an error WrongExpectedVersion.

type WriteStreamRevisionStreamExists

type WriteStreamRevisionStreamExists struct{}

WriteStreamRevisionStreamExists is used when stream must exist. If we try to append to a stream with WriteStreamRevisionStreamExists and stream does not exist we will receive WrongExpectedVersion errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL