package
0.0.0-20250310224150-f24d5ce25984
Repository: https://github.com/buildbarn/bb-storage.git
Documentation: pkg.go.dev
# Functions
BackendProvided indicates that the buffer came from storage.
Irreparable indicates that the buffer was obtained from storage, but that the storage provides no method for repairing the data.
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.
NewValidatedBufferFromReaderAt creates a Buffer that is backed by a ReadAtCloser.
WithErrorHandler attaches an ErrorHandler to a Buffer.
# Variables
UserProvided indicates that the buffer did not come from storage.
# Structs
Source is passed to most New*Buffer() creation functions to specify information where the data contained in the buffer originated.
# 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.
ReadAtCloser is the stream type that is accepted by NewValidatedBufferFromReaderAt().
# Type aliases
DataIntegrityCallback is a callback that is invoked by Buffer whenever the contents of a Buffer have been checked for data integrity.