blobstore

package
v2.0.24+incompatible Latest Latest
Warning

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

Go to latest
Published: May 31, 2017 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blobstore

type Blobstore interface {
	Get(blobID string) (LocalBlob, error)
	Add(sourcePath string) (blobID string, err error)
}

func NewBlobstore

func NewBlobstore(davClient boshdavcli.Client, uuidGenerator boshuuid.Generator, fs boshsys.FileSystem, logger boshlog.Logger) Blobstore

type Config

type Config struct {
	Endpoint string
	Username string
	Password string
}

type Factory

type Factory interface {
	Create(string, *http.Client) (Blobstore, error)
}

func NewBlobstoreFactory

func NewBlobstoreFactory(uuidGenerator boshuuid.Generator, fs boshsys.FileSystem, logger boshlog.Logger) Factory

type LocalBlob

type LocalBlob interface {
	// Path returns the path to the local copy of the blob
	Path() string
	// Delete removes the local copy of the blob (does not effect the blobstore)
	Delete() error
	// DeleteSilently removes the local copy of the blob (does not effect the blobstore), logging instead of returning an error.
	DeleteSilently()
}

LocalBlob represents a local copy of a blob retrieved from the blobstore

func NewLocalBlob

func NewLocalBlob(path string, fs boshsys.FileSystem, logger boshlog.Logger) LocalBlob

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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