distribution: github.com/hanazuki/distribution/registry/storage Index | Files | Directories

package storage

import "github.com/hanazuki/distribution/registry/storage"

Package storage contains storage services for use in the registry application. It should be considered an internal package, as of Go 1.4.


Package Files

blobcachemetrics.go blobserver.go blobstore.go blobwriter.go blobwriter_resumable.go catalog.go doc.go filereader.go linkedblobstore.go manifestlisthandler.go manifeststore.go paths.go purgeuploads.go registry.go schema2manifesthandler.go signaturestore.go signedmanifesthandler.go tagstore.go util.go vacuum.go walk.go


var ErrFinishedWalk = errors.New("finished walk")

ErrFinishedWalk is used when the called walk function no longer wants to accept any more values. This is used for pagination when the required number of repos have been found.

var ErrSkipDir = errors.New("skip this directory")

ErrSkipDir is used as a return value from onFileFunc to indicate that the directory named in the call is to be skipped. It is not returned as an error by any function.

func DisableDigestResumption Uses

func DisableDigestResumption(registry *registry) error

DisableDigestResumption is a functional option for NewRegistry. It should be used if the registry is acting as a caching proxy.

func DisableSchema1Signatures Uses

func DisableSchema1Signatures(registry *registry) error

DisableSchema1Signatures is a functional option for NewRegistry. It disables signature storage and ensures all schema1 manifests will only be returned with a signature from a provided signing key.

func EnableDelete Uses

func EnableDelete(registry *registry) error

EnableDelete is a functional option for NewRegistry. It enables deletion on the registry.

func EnableRedirect Uses

func EnableRedirect(registry *registry) error

EnableRedirect is a functional option for NewRegistry. It causes the backend blob server to attempt using (StorageDriver).URLFor to serve all blobs.

func NewRegistry Uses

func NewRegistry(ctx context.Context, driver storagedriver.StorageDriver, options ...RegistryOption) (distribution.Namespace, error)

NewRegistry creates a new registry instance from the provided driver. The resulting registry may be shared by multiple goroutines but is cheap to allocate. If the Redirect option is specified, the backend blob server will attempt to use (StorageDriver).URLFor to serve all blobs.

func PurgeUploads Uses

func PurgeUploads(ctx context.Context, driver storageDriver.StorageDriver, olderThan time.Time, actuallyDelete bool) ([]string, []error)

PurgeUploads deletes files from the upload directory created before olderThan. The list of files deleted and errors encountered are returned

func SkipLayerVerification Uses

func SkipLayerVerification() distribution.ManifestServiceOption

SkipLayerVerification allows a manifest to be Put before its layers are on the filesystem

func Walk Uses

func Walk(ctx context.Context, driver storageDriver.StorageDriver, from string, f WalkFn) error

Walk traverses a filesystem defined within driver, starting from the given path, calling f on each file

func WithMountFrom Uses

func WithMountFrom(ref reference.Canonical) distribution.BlobCreateOption

WithMountFrom returns a BlobCreateOption which designates that the blob should be mounted from the given canonical reference.

type ManifestHandler Uses

type ManifestHandler interface {
    // Unmarshal unmarshals the manifest from a byte slice.
    Unmarshal(ctx context.Context, dgst digest.Digest, content []byte) (distribution.Manifest, error)

    // Put creates or updates the given manifest returning the manifest digest.
    Put(ctx context.Context, manifest distribution.Manifest, skipDependencyVerification bool) (digest.Digest, error)

A ManifestHandler gets and puts manifests of a particular type.

type RegistryOption Uses

type RegistryOption func(*registry) error

RegistryOption is the type used for functional options for NewRegistry.

func BlobDescriptorCacheProvider Uses

func BlobDescriptorCacheProvider(blobDescriptorCacheProvider cache.BlobDescriptorCacheProvider) RegistryOption

BlobDescriptorCacheProvider returns a functional option for NewRegistry. It creates a cached blob statter for use by the registry.

func Schema1SigningKey Uses

func Schema1SigningKey(key libtrust.PrivateKey) RegistryOption

Schema1SigningKey returns a functional option for NewRegistry. It sets the signing key for adding a signature to all schema1 manifests. This should be used in conjunction with disabling signature store.

type Vacuum Uses

type Vacuum struct {
    // contains filtered or unexported fields

Vacuum removes content from the filesystem

func NewVacuum Uses

func NewVacuum(ctx context.Context, driver driver.StorageDriver) Vacuum

NewVacuum creates a new Vacuum

func (Vacuum) RemoveBlob Uses

func (v Vacuum) RemoveBlob(dgst string) error

RemoveBlob removes a blob from the filesystem

func (Vacuum) RemoveRepository Uses

func (v Vacuum) RemoveRepository(repoName string) error

RemoveRepository removes a repository directory from the filesystem

type WalkFn Uses

type WalkFn func(fileInfo storageDriver.FileInfo) error

WalkFn is called once per file by Walk If the returned error is ErrSkipDir and fileInfo refers to a directory, the directory will not be entered and Walk will continue the traversal. Otherwise Walk will return


cachePackage cache provides facilities to speed up access to the storage backend.
driver/azurePackage azure provides a storagedriver.StorageDriver implementation to store blobs in Microsoft Azure Blob Storage Service.
driver/basePackage base provides a base implementation of the storage driver that can be used to implement common checks.
driver/gcsPackage gcs implements the Google Cloud Storage driver backend.
driver/middleware/cloudfrontPackage middleware - cloudfront wrapper for storage libs N.B.
driver/ossPackage oss implements the Aliyun OSS Storage driver backend.
driver/s3-awsPackage s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.
driver/s3-goamzPackage s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.
driver/swiftPackage swift provides a storagedriver.StorageDriver implementation to store blobs in Openstack Swift object storage.

Package storage imports 33 packages (graph). Updated 2017-06-10. Refresh now. Tools for package owners. This is a dead-end fork (no commits since the fork).