package
0.0.0-20200723042522-932836ee9d04
Repository: https://github.com/mixpanel/bb-storage.git
Documentation: pkg.go.dev

# Functions

NewBufferFromError creates a Buffer that returns a fixed error response for all operations.
NewCASBufferFromByteSlice creates a buffer for an object stored in the Content Addressable Storage, backed by a byte slice.
NewCASBufferFromChunkReader creates a buffer for an object stored in the Content Addressable Storage, backed by a ChunkReader.
NewCASBufferFromReader creates a buffer for an object stored in the Content Addressable Storage, whose contents may be obtained through a ReadCloser.
NewProtoBufferFromByteSlice creates a buffer for an object contained in a Protobuf storage such as Action Cache, based on a marshaled Protobuf message stored in a byte slice.
NewProtoBufferFromProto creates a buffer for an object contained in a Protobuf storage such as the Action Cache, based on an unmarshaled Protobuf message.
NewProtoBufferFromReader creates a buffer for an object contained in a Protobuf storage such as the Action Cache, based on a marshaled Protobuf message that may be obtained through a ReadCloser.
NewValidatedBufferFromByteSlice creates a Buffer that is backed by a slice of bytes.
NewValidatedBufferFromFileReader creates a Buffer that is backed by a FileReader.
Reparable indicates that the buffer was obtained from storage and that the storage backend provides a method for repairing data inconsistencies.
WithBackgroundTask returns a decorated Buffer which will at the end of its lifetime wait for the completion of a background task.
WithErrorHandler attaches an ErrorHandler to a Buffer.

# Variables

Irreparable indicates that the buffer was obtained from storage, but that the storage provides no method for repairing the data.
UserProvided indicates that the buffer did not come from storage.

# Structs

BackgroundTask is a handle returned by WithBackgroundTask().
RepairStrategy is passed to most New*Buffer() creation functions to specify a strategy for how to deal with data consistency issues.

# Interfaces

Buffer of data to be read from/written to the Action Cache (AC) or Content Addressable Storage (CAS).
ChunkReader is similar to io.ReadCloser, except that data is not copied from the stream into an output array.
ErrorHandler provides the possibility to hook into errors that occur on Buffer objects.

# Type aliases

RepairFunc is a callback that may be invoked by buffer objects to report that the contents of the buffer are observed to be invalid.