engineapi

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: Apache-2.0, Apache-2.0 Imports: 0 Imported by: 0

README

GoDoc

Deprecated

For new projects please do not use this project anymore. The Docker API client and types have been moved to the main docker repo under the following import paths:

All pull requests and issues should be filed under the docker/docker repository. This repo will not receive any future updates and you should update your existing import paths to the new package paths.

License

engine-api is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Documentation

Overview

Package engineapi provides libraries to implement client and server components compatible with the Docker engine.

The client package in github.com/docker/engine-api/client implements all necessary requests to implement the official Docker engine cli.

Create a new client, then use it to send and receive messages to the Docker engine API:

defaultHeaders := map[string]string{"User-Agent": "engine-api-cli-1.0"}
cli, err := client.NewClient("unix:///var/run/docker.sock", "v1.22", nil, defaultHeaders)

Other programs, like Docker Machine, can set the default Docker engine environment for you. There is a shortcut to use its variables to configure the client:

cli, err := client.NewEnvClient()

All request arguments are defined as typed structures in the types package. For instance, this is how to get all containers running in the host:

options := types.ContainerListOptions{All: true}
containers, err := cli.ContainerList(context.Background(), options)

Directories

Path Synopsis
transport
Package transport provides function to send request to remote endpoints.
Package transport provides function to send request to remote endpoints.
transport/cancellable
Package cancellable provides helper function to cancel http requests.
Package cancellable provides helper function to cancel http requests.
Package types is used for API stability in the types and response to the consumers of the API stats endpoint.
Package types is used for API stability in the types and response to the consumers of the API stats endpoint.
filters
Package filters provides helper function to parse and handle command line filter, used for example in docker ps or docker images commands.
Package filters provides helper function to parse and handle command line filter, used for example in docker ps or docker images commands.
versions/v1p19
Package v1p19 provides specific API types for the API version 1, patch 19.
Package v1p19 provides specific API types for the API version 1, patch 19.
versions/v1p20
Package v1p20 provides specific API types for the API version 1, patch 20.
Package v1p20 provides specific API types for the API version 1, patch 20.

Jump to

Keyboard shortcuts

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