distribution

package
v1.13.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2016 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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