blob_store

package
v0.0.0-...-791c77c Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBlob

func CopyBlob(
	env env_ui.Env,
	dst interfaces.BlobStore,
	src interfaces.BlobStore,
	blobSha interfaces.Sha,
	extraWriter io.Writer,
) (n int64, err error)

TODO make this honor context closure and abort early

func CopyBlobIfNecessary

func CopyBlobIfNecessary(
	env env_ui.Env,
	dst interfaces.BlobStore,
	src interfaces.BlobStore,
	blobShaGetter interfaces.ShaGetter,
	extraWriter io.Writer,
) (n int64, err error)

func MakeShardedFilesStore

func MakeShardedFilesStore(
	basePath string,
	config env_dir.Config,
	tempFS env_dir.TemporaryFS,
) storeShardedFiles

Types

type CopyingBlobStore

type CopyingBlobStore struct {
	env_ui.Env
	// contains filtered or unexported fields
}

func MakeCopyingBlobStore

func MakeCopyingBlobStore(
	env env_ui.Env,
	local interfaces.LocalBlobStore,
	remote interfaces.BlobStore,
) CopyingBlobStore

func (CopyingBlobStore) AllBlobs

func (s CopyingBlobStore) AllBlobs() iter.Seq2[interfaces.Sha, error]

func (CopyingBlobStore) BlobReader

func (s CopyingBlobStore) BlobReader(
	sh interfaces.Sha,
) (r interfaces.ShaReadCloser, err error)

func (CopyingBlobStore) BlobWriter

func (s CopyingBlobStore) BlobWriter() (w sha.WriteCloser, err error)

func (CopyingBlobStore) GetBlobStore

func (s CopyingBlobStore) GetBlobStore() interfaces.BlobStore

func (CopyingBlobStore) GetLocalBlobStore

func (s CopyingBlobStore) GetLocalBlobStore() interfaces.LocalBlobStore

func (CopyingBlobStore) HasBlob

func (s CopyingBlobStore) HasBlob(sh interfaces.Sha) bool

type LocalBlobStore

type LocalBlobStore interface {
	interfaces.LocalBlobStore
	Mover() (*env_dir.Mover, error)
}

Jump to

Keyboard shortcuts

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