Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModuleReader ¶
func NewModuleReader( logger *zap.Logger, dataReadWriteBucket storage.ReadWriteBucket, sumReadWriteBucket storage.ReadWriteBucket, delegate bufmodule.ModuleReader, options ...ModuleReaderOption, ) bufmodule.ModuleReader
NewModuleReader returns a new ModuleReader that uses cache as a caching layer, and delegate as the source of truth.
Types ¶
type ModuleReaderOption ¶
type ModuleReaderOption func(*moduleReader)
ModuleReaderOption is an option for a new ModuleReader.
func WithFileLocker ¶
func WithFileLocker(fileLocker filelock.Locker) ModuleReaderOption
WithFileLocker adds the given Locker to synchronize between operations.
The default is to not synchronize between operations.
func WithMessageWriter ¶
func WithMessageWriter(messageWriter io.Writer) ModuleReaderOption
WithMessageWriter adds the given Writer to print messages.
This is typically stderr. The default is to not print messages.
Click to show internal directories.
Click to hide internal directories.