blob

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStore

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

LocalStore stores blobs on local disk, sharded git-object-store style: <root>/<first-2-hex>/<full-hex>.

func NewLocalStore

func NewLocalStore(root string) *LocalStore

func (*LocalStore) Get

func (s *LocalStore) Get(contentHash string) ([]byte, error)

func (*LocalStore) Has

func (s *LocalStore) Has(contentHash string) (bool, error)

func (*LocalStore) Put

func (s *LocalStore) Put(content []byte) (string, error)

type Store

type Store interface {
	Put(content []byte) (contentHash string, err error)
	Get(contentHash string) ([]byte, error)
	Has(contentHash string) (bool, error)
}

Store is the content-addressable blob interface. Payloads are immutable and identified purely by content hash — a future S3/MinIO implementation satisfies the same interface.

Jump to

Keyboard shortcuts

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