supermiddleware

package
v3.9.0-alpha.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 15 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)
}

App is a set of middlewares for the Docker registry.

type HackRegistry

type HackRegistry struct {
	distribution.Namespace
}

HackRegistry must not be used.

func (HackRegistry) HackRepository

HackRepository must not be used.

Jump to

Keyboard shortcuts

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