blobstore

package
v7.8.5 Latest Latest
Warning

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

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

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 DavCLIClient, uuidGenerator boshuuid.Generator, fs boshsys.FileSystem, logger boshlog.Logger) Blobstore

type Config

type Config struct {
	Endpoint string
	Username string
	Password string
}

type DavCLIClient

type DavCLIClient interface {
	Get(path string) (content io.ReadCloser, err error)
	Put(path string, content io.ReadCloser, contentLength int64) (err error)
}

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
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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