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

Functions

func NewRegistryWithDriver

func NewRegistryWithDriver(driver storagedriver.StorageDriver) distribution.Registry

NewRegistryWithDriver creates a new registry instance from the provided driver. The resulting registry may be shared by multiple goroutines but is cheap to allocate.

func RegisterLayerHandler

func RegisterLayerHandler(name string, initFunc LayerHandlerInitFunc) error

RegisterLayerHandler is used to register an LayerHandlerInitFunc for a LayerHandler backend with the given name.

Types

type LayerHandler

type LayerHandler interface {
	// Resolve returns an http.Handler which can serve the contents of a given
	// Layer if possible, or nil and an error when unsupported. This may
	// directly serve the contents of the layer or issue a redirect to another
	// URL hosting the content.
	Resolve(layer distribution.Layer) (http.Handler, error)
}

LayerHandler provides middleware for serving the contents of a Layer.

func GetLayerHandler

func GetLayerHandler(name string, options map[string]interface{}, storageDriver storagedriver.StorageDriver) (LayerHandler, error)

GetLayerHandler constructs a LayerHandler with the given options using the named backend.

type LayerHandlerInitFunc

type LayerHandlerInitFunc func(storageDriver storagedriver.StorageDriver, options map[string]interface{}) (LayerHandler, error)

LayerHandlerInitFunc is the type of a LayerHandler factory function and is used to register the contsructor for different LayerHandler backends.

Source Files

blobstore.go cloudfrontlayerhandler.go delegatelayerhandler.go doc.go filereader.go filewriter.go layerhandler.go layerreader.go layerstore.go layerupload.go manifeststore.go paths.go registry.go revisionstore.go signaturestore.go tagstore.go

Directories

PathSynopsis
registry/storage/driver
registry/storage/driver/azurePackage azure provides a storagedriver.StorageDriver implementation to store blobs in Microsoft Azure Blob Storage Service.
registry/storage/driver/basePackage 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/s3Package s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.
registry/storage/driver/testsuites
Version
v2.0.0-alpha.3+incompatible
Published
Mar 7, 2015
Platform
js/wasm
Imports
25 packages
Last checked
17 hours ago

Tools for package owners.