Documentation ¶
Overview ¶
Package memory supplies fake in-memory implementations for testing purposes.
Index ¶
- type MutationLogs
- func (m MutationLogs) AddLogs(_ context.Context, _ string, logIDs ...int64) error
- func (m MutationLogs) HighWatermark(_ context.Context, _ string, logID int64, start water.Mark, batchSize int32) (int32, water.Mark, error)
- func (m MutationLogs) ListLogs(_ context.Context, _ string, writable bool) ([]int64, error)
- func (m MutationLogs) ReadLog(_ context.Context, _ string, logID int64, low, high water.Mark, ...) ([]*mutator.LogMessage, error)
- func (m MutationLogs) SendBatch(_ context.Context, _ string, logID int64, mutations []*pb.EntryUpdate) (water.Mark, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MutationLogs ¶
type MutationLogs map[int64][]batch // Map of logID to Slice of LogMessages
MutationLogs is a fake, in-memory implementation of a keyserver.MutationLogss. All requests are presumed to be for the same domainID. TODO(gbelvin): Support multiple domainIDs, if tests call for it. MutationLogs is NOT threadsafe.
func NewMutationLogs ¶
func NewMutationLogs() MutationLogs
NewMutationLogs creates a new fake MutationLogs.
func (MutationLogs) HighWatermark ¶
func (m MutationLogs) HighWatermark(_ context.Context, _ string, logID int64, start water.Mark, batchSize int32) (int32, water.Mark, error)
HighWatermark returns the highest watermark batchSize items beyond start.
func (MutationLogs) ReadLog ¶
func (m MutationLogs) ReadLog(_ context.Context, _ string, logID int64, low, high water.Mark, batchSize int32) ([]*mutator.LogMessage, error)
ReadLog returns mutations between [low, high). Always returns complete batches. ReadLog will return more items than batchSize if necessary to return a complete batch.
Click to show internal directories.
Click to hide internal directories.