trustedlabels

package
v0.0.0-...-ecb461a Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-2-Clause Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrUnknownContainer is the error used when a Docker container could not be
	// identified.
	ErrUnknownContainer = errors.New("unknown docker container")
)

Functions

This section is empty.

Types

type Retriever

type Retriever interface {
	LabelsForPID(pid int) (map[string]struct{}, error)
}

A Retriever is a type capable of looking up the docker image labels for a given PID. In other words, if a docker image, I, is used to launch a container, C, and that container contains a process with PID P, then calling LabelsForPID(P) will return all of the labels associated with I.

func NewDocker

func NewDocker(trustServer string, trustBaseDir string) (Retriever, error)

NewDocker returns a new Retriever that uses the provided notary server and trust store base directory to look up labels in the Docker daemon and then validate the associated images' cryptographic signatures.

func NewMock

func NewMock(labels map[string]struct{}) Retriever

NewMock returns a mocked Retriever which always responds with the given set of labels to any request.

Jump to

Keyboard shortcuts

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