blobstore

package
v0.0.0-...-b178995 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBlobExists = fmt.Errorf("blob exist")
View Source
var ErrRemoteNotAvailable = fmt.Errorf("remote backend not available")

Functions

func NextHexKey

func NextHexKey(key string) string

Types

type BlobStore

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

func New

func New(logger log.Logger, root bool, dir string, conf2 *config.Config, hub *hub.Hub) (*BlobStore, error)

func (*BlobStore) Check

func (bs *BlobStore) Check() error

func (*BlobStore) Close

func (bs *BlobStore) Close() error

func (*BlobStore) Enumerate

func (bs *BlobStore) Enumerate(ctx context.Context, start, end string, limit int) ([]*blob.SizedBlobRef, string, error)

func (backend *BlobsFileBackend) Enumerate(blobs chan<- *blob.SizedBlobRef, start, stop string, limit int) error {

func (*BlobStore) Get

func (bs *BlobStore) Get(ctx context.Context, hash string) ([]byte, error)

func (*BlobStore) Put

func (bs *BlobStore) Put(ctx context.Context, blob *blob.Blob) (bool, error)

func (*BlobStore) ReplicationEnabled

func (bs *BlobStore) ReplicationEnabled() bool

func (*BlobStore) S3Backend

func (bs *BlobStore) S3Backend() *s3.S3Backend

func (*BlobStore) S3Stats

func (bs *BlobStore) S3Stats() (map[string]interface{}, error)

func (*BlobStore) Scan

func (bs *BlobStore) Scan(ctx context.Context) error

func (*BlobStore) Stat

func (bs *BlobStore) Stat(ctx context.Context, hash string) (bool, error)

func (*BlobStore) Stats

func (bs *BlobStore) Stats() (*blobsfile.Stats, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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