Documentation
¶
Overview ¶
Package mutationstorage defines operations to write and read mutations to and from the database.
Index ¶
- type Mutations
- func (m *Mutations) NewReceiver(ctx context.Context, last time.Time, domainID string, ...) mutator.Receiver
- func (m *Mutations) ReadPage(ctx context.Context, domainID string, revision, start int64, pageSize int32) (int64, []*pb.Entry, error)
- func (m *Mutations) Send(ctx context.Context, domainID string, update *pb.EntryUpdate) error
- func (m *Mutations) WriteBatch(ctx context.Context, domainID string, revision int64, mutations []*pb.Entry) error
- type Receiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutations ¶
type Mutations struct {
// contains filtered or unexported fields
}
Mutations implements mutator.MutationStorage and mutator.MutationQueue.
func (*Mutations) NewReceiver ¶
func (m *Mutations) NewReceiver(ctx context.Context, last time.Time, domainID string, recieveFunc mutator.ReceiveFunc, rOpts mutator.ReceiverOptions) mutator.Receiver
NewReceiver starts receiving messages sent to the queue. As batches become ready, recieveFunc will be called.
func (*Mutations) ReadPage ¶
func (m *Mutations) ReadPage(ctx context.Context, domainID string, revision, start int64, pageSize int32) (int64, []*pb.Entry, error)
ReadPage reads all mutations for a specific given domainID and sequence range. The range is identified by a starting sequence number and a count. Note that startSequence is not included in the result. ReadRange stops when endSequence or count is reached, whichever comes first. ReadRange also returns the maximum sequence number read.
Click to show internal directories.
Click to hide internal directories.