blobstore

package
v0.0.0-...-3d8c8f1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlobstoreTypeDummy = "dummy"
	BlobstoreTypeLocal = "local"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobManager

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

func NewBlobManager

func NewBlobManager(fs boshsys.FileSystem, blobstorePath string) (manager BlobManager)

func (BlobManager) BlobExists

func (manager BlobManager) BlobExists(blobID string) bool

func (BlobManager) Delete

func (manager BlobManager) Delete(blobID string) error

func (BlobManager) Fetch

func (manager BlobManager) Fetch(blobID string) (boshsys.File, error, int)

func (BlobManager) GetPath

func (manager BlobManager) GetPath(blobID string) (string, error)

func (BlobManager) Write

func (manager BlobManager) Write(blobID string, reader io.Reader) error

type BlobManagerInterface

type BlobManagerInterface interface {
	Fetch(blobID string) (boshsys.File, error, int)

	Write(blobID string, reader io.Reader) error

	GetPath(blobID string) (string, error)

	Delete(blobID string) error

	BlobExists(blobID string) bool
}

type Blobstore

type Blobstore interface {
	// Assuming that local file system is available,
	// file handle is returned to downloaded blob.
	// Caller must not assume anything about layout of such scratch space.
	// Cleanup call is needed to properly cleanup downloaded blob.
	Get(blobID string, digest boshcrypto.Digest) (fileName string, err error)

	CleanUp(fileName string) (err error)

	Create(fileName string) (blobID string, err error)

	Validate() (err error)

	Delete(blobId string) (err error)
}

func NewDigestVerifiableBlobstore

func NewDigestVerifiableBlobstore(blobstore Blobstore, digestProvider boshcrypto.DigestProvider) Blobstore

func NewExternalBlobstore

func NewExternalBlobstore(
	provider string,
	options map[string]interface{},
	fs boshsys.FileSystem,
	runner boshsys.CmdRunner,
	uuidGen boshuuid.Generator,
	configFilePath string,
) Blobstore

func NewLocalBlobstore

func NewLocalBlobstore(
	fs boshsys.FileSystem,
	uuidGen boshuuid.Generator,
	options map[string]interface{},
) Blobstore

func NewRetryableBlobstore

func NewRetryableBlobstore(blobstore Blobstore, maxTries int, logger boshlog.Logger) Blobstore

type Provider

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

func NewProvider

func NewProvider(
	fs system.FileSystem,
	runner system.CmdRunner,
	configDir string,
	digestProvider boshcrypto.DigestProvider,
	logger boshlog.Logger,
) Provider

func (Provider) Get

func (p Provider) Get(storeType string, options map[string]interface{}) (blobstore Blobstore, err error)

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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