bufmodulecache

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

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 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.

Jump to

Keyboard shortcuts

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