Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModuleReader ¶
func NewModuleReader( logger *zap.Logger, readWriteBucket 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 ¶ added in v0.22.0
type ModuleReaderOption func(*moduleReader)
ModuleReaderOption is an option for a new ModuleReader.
func WithFileLocker ¶ added in v0.35.0
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 ¶ added in v0.22.0
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.