supermiddleware

package
v4.2.26+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package supermiddleware provides helpers to run the Docker registry with middlewares without having to register them globally. Also it allows having a custom blob descriptor service for each repository.

Index

Constants

View Source
const Name = "openshift"

Name is the name which is used to register middlewares.

Variables

This section is empty.

Functions

func NewApp

func NewApp(ctx context.Context, config *configuration.Configuration, app App) *handlers.App

NewApp configures the registry application to use specified set of middlewares. It returns an object that is ready to serve requests.

func NewRegistry

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

NewRegistry constructs a registry object that uses app middlewares.

Types

type App

type App interface {
	Auth(options map[string]interface{}) (auth.AccessController, error)
	Storage(driver storagedriver.StorageDriver, options map[string]interface{}) (storagedriver.StorageDriver, error)
	Registry(registry distribution.Namespace, options map[string]interface{}) (distribution.Namespace, error)
	Repository(ctx context.Context, repo distribution.Repository, crossmount bool) (distribution.Repository, distribution.BlobDescriptorServiceFactory, error)
	CacheProvider(ctx context.Context, options map[string]interface{}) (cache.BlobDescriptorCacheProvider, error)
}

App is a set of middlewares for the Docker registry.

Jump to

Keyboard shortcuts

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