distribution

package
v0.11.2-0...-ba408fb Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTag = "latest"

DefaultTag is the default tag for plugins

Variables

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

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

View Source
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

Jump to

Keyboard shortcuts

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