package distribution

import "github.com/dotcloud/docker/plugin/distribution"

Index

Constants

const DefaultTag = "latest"

DefaultTag is the default tag for plugins

Variables

var ErrUnsupportedMediaType = errors.New("content is not a plugin")

ErrUnsupportedMediaType indicates we are pulling content that's not a plugin

var ErrUnsupportedRegistry = errors.New("only V2 repositories are supported for plugin distribution")

ErrUnsupportedRegistry indicates that the registry does not support v2 protocol

Functions

func GetRef

func GetRef(name string) (reference.Named, error)

GetRef returns the distribution reference for a given name.

func GetTag

func GetTag(ref reference.Named) string

GetTag returns the tag associated with the given reference name.

func Push

func Push(name string, rs registry.Service, metaHeader http.Header, authConfig *types.AuthConfig, config io.ReadCloser, layers io.ReadCloser) (digest.Digest, error)

Push pushes a plugin to a registry.

func WritePullData

func WritePullData(pd PullData, dest string, extract bool) error

WritePullData extracts manifest and rootfs to the disk.

Types

type PullData

type PullData interface {
	Config() ([]byte, error)
	Layer() (io.ReadCloser, error)
}

PullData is the plugin config and the rootfs

func Pull

func Pull(ref reference.Named, rs registry.Service, metaheader http.Header, authConfig *types.AuthConfig) (PullData, error)

Pull downloads the plugin from Store

Source Files

pull.go push.go types.go

Version
v1.13.0-rc4
Published
Dec 16, 2016
Platform
linux/amd64
Imports
19 packages
Last checked
9 minutes ago

Tools for package owners.