registry

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package registry provides the main entrypoints for running a registry.

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "registry <config>",
	Short: "registry stores and distributes Docker images",
	Long:  "registry stores and distributes Docker images.",
	Run: func(cmd *cobra.Command, args []string) {
		if showVersion {
			version.PrintVersion()
			return
		}

		ctx := context.WithVersion(context.Background(), version.Version)

		config, err := resolveConfiguration(args)
		if err != nil {
			fmt.Fprintf(os.Stderr, "configuration error: %v\n", err)
			cmd.Usage()
			os.Exit(1)
		}

		if config.HTTP.Debug.Addr != "" {
			go func(addr string) {
				log.Infof("debug server listening %v", addr)
				if err := http.ListenAndServe(addr, nil); err != nil {
					log.Fatalf("error listening on debug interface: %v", err)
				}
			}(config.HTTP.Debug.Addr)
		}

		registry, err := NewRegistry(ctx, config)
		if err != nil {
			log.Fatalln(err)
		}

		if err = registry.ListenAndServe(); err != nil {
			log.Fatalln(err)
		}
	},
}

Cmd is a cobra command for running the registry.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

A Registry represents a complete instance of the registry. TODO(aaronl): It might make sense for Registry to become an interface.

func NewRegistry

func NewRegistry(ctx context.Context, config *configuration.Configuration) (*Registry, error)

NewRegistry creates a new registry from a context and configuration struct.

func (*Registry) ListenAndServe

func (registry *Registry) ListenAndServe() error

ListenAndServe runs the registry's HTTP server.

Directories

Path Synopsis
api
v2
Package v2 describes routes, urls and the error codes used in the Docker Registry JSON HTTP API V2.
Package v2 describes routes, urls and the error codes used in the Docker Registry JSON HTTP API V2.
Package auth defines a standard interface for request access controllers.
Package auth defines a standard interface for request access controllers.
htpasswd
Package htpasswd provides a simple authentication scheme that checks for the user credential hash in an htpasswd formatted file in a configuration-determined location.
Package htpasswd provides a simple authentication scheme that checks for the user credential hash in an htpasswd formatted file in a configuration-determined location.
silly
Package silly provides a simple authentication scheme that checks for the existence of an Authorization header and issues access if is present and non-empty.
Package silly provides a simple authentication scheme that checks for the existence of an Authorization header and issues access if is present and non-empty.
middleware
Package storage contains storage services for use in the registry application.
Package storage contains storage services for use in the registry application.
cache
Package cache provides facilities to speed up access to the storage backend.
Package cache provides facilities to speed up access to the storage backend.
driver/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.
driver/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.
driver/gcs
Package gcs implements the Google Cloud Storage driver backend.
Package gcs implements the Google Cloud Storage driver backend.
driver/middleware/cloudfront
Package middleware - cloudfront wrapper for storage libs N.B. currently only works with S3, not arbitrary sites
Package middleware - cloudfront wrapper for storage libs N.B. currently only works with S3, not arbitrary sites
driver/oss
Package oss implements the Aliyun OSS Storage driver backend.
Package oss implements the Aliyun OSS Storage driver backend.
driver/rados
Package rados implements the rados storage driver backend.
Package rados implements the rados storage driver backend.
driver/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.
driver/swift
Package swift provides a storagedriver.StorageDriver implementation to store blobs in Openstack Swift object storage.
Package swift provides a storagedriver.StorageDriver implementation to store blobs in Openstack Swift object storage.

Jump to

Keyboard shortcuts

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