blob

package
v1.1.0-solo.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash string

type Store

type Store struct {
	// contains filtered or unexported fields
}

func Open

func Open(dir string) (*Store, error)

func OpenReadOnly

func OpenReadOnly(dir string) (*Store, error)

OpenReadOnly never creates source state. Missing referenced objects fail on lookup; an empty history need not have an objects directory yet.

func (*Store) Chunks

func (s *Store) Chunks(h Hash) ([]Hash, error)

Chunks returns the chunk hashes referenced by a stored blob. Legacy blobs contain zstd data and have no child objects.

func (*Store) Get

func (s *Store) Get(h Hash) (io.ReadCloser, error)

func (*Store) GetChunk

func (s *Store) GetChunk(h Hash) (io.ReadCloser, error)

GetChunk exposes a verified, bounded chunk for the sync protocol.

func (*Store) Has

func (s *Store) Has(h Hash) bool

func (*Store) Put

func (s *Store) Put(r io.Reader) (Hash, error)

func (*Store) PutBytes

func (s *Store) PutBytes(b []byte) (Hash, error)

func (*Store) PutChunk

func (s *Store) PutChunk(h Hash, data []byte) error

PutChunk stores a network chunk only after validating its content hash.

func (*Store) PutChunked

func (s *Store) PutChunked(h Hash, chunks []Hash) error

PutChunked verifies every referenced chunk and the whole-file hash before making a recovered blob visible. Existing history is never overwritten.

Jump to

Keyboard shortcuts

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