index

package
v5.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 13 Imported by: 78

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSIndex

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

func NewFSIndex

func NewFSIndex(
	name string,
	dirPath string,
	useSubdir bool,
	expectsBlobstoreIDs bool,
	reporter Reporter,
	blobs IndexBlobs,
	fs boshsys.FileSystem,
) FSIndex

func (FSIndex) Add

func (i FSIndex) Add(name, fingerprint, path, sha1 string) (string, string, error)

func (FSIndex) Find

func (i FSIndex) Find(name, fingerprint string) (string, string, error)

type FSIndexBlobs

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

func NewFSIndexBlobs

func NewFSIndexBlobs(
	dirPath string,
	reporter Reporter,
	blobstore boshblob.DigestBlobstore,
	fs boshsys.FileSystem,
) FSIndexBlobs

func (FSIndexBlobs) Add

func (c FSIndexBlobs) Add(name, path, sha1 string) (string, string, error)

Add adds file to cache and blobstore but does not guarantee that file have expected SHA1 when retrieved later.

func (FSIndexBlobs) Get

func (c FSIndexBlobs) Get(name string, blobID string, digestString string) (string, error)

Get gurantees that returned file matches requested digest string.

type Index

type Index interface {
	Find(name, version string) (string, string, error)
	Add(name, version, path, sha1 string) (string, string, error)
}

type IndexBlobs

type IndexBlobs interface {
	Get(name, blobID, sha1 string) (string, error)
	Add(name, path, sha1 string) (string, string, error)
}

type Provider

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

func NewProvider

func NewProvider(
	reporter Reporter,
	blobstore boshblob.DigestBlobstore,
	fs boshsys.FileSystem,
) Provider

func (Provider) DevAndFinalIndicies

func (p Provider) DevAndFinalIndicies(dirPath string) (boshrel.ArchiveIndicies, boshrel.ArchiveIndicies)

type Reporter

type Reporter interface {
	IndexEntryStartedAdding(type_, desc string)
	IndexEntryFinishedAdding(type_, desc string, err error)

	IndexEntryDownloadStarted(type_, desc string)
	IndexEntryDownloadFinished(type_, desc string, err error)

	IndexEntryUploadStarted(type_, desc string)
	IndexEntryUploadFinished(type_, desc string, err error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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