storage

package
v2.0.0-alpha.3+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2015 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Directories

Path Synopsis
azure
Package azure provides a storagedriver.StorageDriver implementation to store blobs in Microsoft Azure Blob Storage Service.
Package azure provides a storagedriver.StorageDriver implementation to store blobs in Microsoft Azure Blob Storage Service.
base
Package base provides a base implementation of the storage driver that can be used to implement common checks.
Package base provides a base implementation of the storage driver that can be used to implement common checks.
s3
Package s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.
Package s3 provides a storagedriver.StorageDriver implementation to store blobs in Amazon S3 cloud storage.

Jump to

Keyboard shortcuts

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