storage

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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 Storage

type Storage interface {
	// Open returns a handle on an existing object keyed by the given object
	// ID.  It returns an error if that file does not already exist.
	Open(oid plumbing.Hash) (f io.ReadCloser, err error)
	//
	Exists(name plumbing.Hash) error
	//
	Search(prefix plumbing.Hash) (plumbing.Hash, error)
	// Close closes the filesystem, after which no more operations are
	// allowed.
	Close() error
}

func MultiStorage

func MultiStorage(args ...Storage) Storage

type WritableStorage

type WritableStorage interface {
	Storage
	HashTo(ctx context.Context, r io.Reader, size int64) (oid plumbing.Hash, err error)
	Unpack(oid plumbing.Hash, r io.Reader) (err error)
	WriteEncoded(e object.Encoder) (oid plumbing.Hash, err error)
	LooseObjects() ([]plumbing.Hash, error)
	PruneObject(ctx context.Context, oid plumbing.Hash) error
	PruneObjects(ctx context.Context, largeSize int64) ([]plumbing.Hash, int64, error)
}

Jump to

Keyboard shortcuts

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