package storage
import "github.com/docker/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.
Index ¶
- Variables
- func NewRegistryWithDriver(ctx context.Context, driver storagedriver.StorageDriver, blobDescriptorCacheProvider cache.BlobDescriptorCacheProvider, deleteEnabled bool, redirect bool, isCache bool) distribution.Namespace
- func PurgeUploads(ctx context.Context, driver storageDriver.StorageDriver, olderThan time.Time, actuallyDelete bool) ([]string, []error)
- func SkipLayerVerification(ms distribution.ManifestService) error
- func Walk(ctx context.Context, driver storageDriver.StorageDriver, from string, f WalkFn) error
- type Vacuum
- func NewVacuum(ctx context.Context, driver driver.StorageDriver) Vacuum
- func (v Vacuum) RemoveBlob(dgst string) error
- func (v Vacuum) RemoveRepository(repoName string) error
- type WalkFn
Variables ¶
SkipDir 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.
Functions ¶
func NewRegistryWithDriver ¶
func NewRegistryWithDriver(ctx context.Context, driver storagedriver.StorageDriver, blobDescriptorCacheProvider cache.BlobDescriptorCacheProvider, deleteEnabled bool, redirect bool, isCache bool) distribution.Namespace
NewRegistryWithDriver creates a new registry instance from the provided driver. The resulting registry may be shared by multiple goroutines but is cheap to allocate. If redirect is true, the backend blob server will attempt to use (StorageDriver).URLFor to serve all blobs.
TODO(stevvooe): This function signature is getting very out of hand. Move to functional options for instance configuration.
func PurgeUploads ¶
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 ¶
func SkipLayerVerification(ms distribution.ManifestService) error
SkipLayerVerification allows a manifest to be Put before it's layers are on the filesystem
func Walk ¶
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
Types ¶
type Vacuum ¶
type Vacuum struct {
// contains filtered or unexported fields
}
Vacuum removes content from the filesystem
func NewVacuum ¶
func NewVacuum(ctx context.Context, driver driver.StorageDriver) Vacuum
NewVacuum creates a new Vacuum
func (Vacuum) RemoveBlob ¶
RemoveBlob removes a blob from the filesystem
func (Vacuum) RemoveRepository ¶
RemoveRepository removes a repository directory from the filesystem
type WalkFn ¶
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
Source Files ¶
blobcachemetrics.go blobserver.go blobstore.go blobwriter.go blobwriter_resumable.go catalog.go doc.go filereader.go filewriter.go linkedblobstore.go manifeststore.go paths.go purgeuploads.go registry.go revisionstore.go signaturestore.go tagstore.go util.go vacuum.go walk.go
Directories ¶
Path | Synopsis |
---|---|
registry/storage/cache | Package cache provides facilities to speed up access to the storage backend. |
registry/storage/cache/memory | |
registry/storage/cache/redis | |
registry/storage/driver | |
registry/storage/driver/azure | Package azure provides a storagedriver.StorageDriver implementation to store blobs in Microsoft Azure Blob Storage Service. |
registry/storage/driver/base | Package base provides a base implementation of the storage driver that can be used to implement common checks. |
registry/storage/driver/factory | |
registry/storage/driver/filesystem | |
registry/storage/driver/inmemory | |
registry/storage/driver/middleware | |
registry/storage/driver/middleware/cloudfront | Package middleware - cloudfront wrapper for storage libs N.B. currently only works with S3, not arbitrary sites |
registry/storage/driver/oss | Package oss implements the Aliyun OSS Storage driver backend. |
registry/storage/driver/rados | Package rados implements the rados storage driver backend. |
registry/storage/driver/s3 | Package s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage. |
registry/storage/driver/swift | Package swift provides a storagedriver.StorageDriver implementation to store blobs in Openstack Swift object storage. |
registry/storage/driver/testsuites |
- Version
- v2.1.1+incompatible
- Published
- Aug 12, 2015
- Platform
- js/wasm
- Imports
- 30 packages
- Last checked
- 1 day ago –
Tools for package owners.