engine-api travis-ci

Go libraries providing client and server components compatible with the Docker engine

3 years after

GoDoc

Introduction

Engine-api is a set of Go libraries to implement client and server components compatible with the Docker engine. The code was extracted from the Docker engine and contributed back as an external library.

Components

Client

The client package implements a fully featured http client to interact with the Docker engine. It's modeled after the requirements of the Docker engine CLI, but it can also serve other purposes.

Usage

You can use this client package in your applications by creating a new client object. Then use that object to execute operations against the remote server. Follow the example below to see how to list all the containers running in a Docker engine host:

package main

import (
    "fmt"
    "github.com/docker/engine-api/client"
    "github.com/docker/engine-api/types"
)

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

    options := types.ContainerListOptions{All: true}
    containers, err := cli.ContainerList(options)
    if err != nil {
        panic(err)
    }

    for _, c := range containers {
        fmt.Println(c.ID)
    }
}

Types

The types package includes all typed structures that client and server serialize to execute operations.

Server

The server package includes API endpoints that applications compatible with the Docker engine API can reuse. It also provides useful middlewares and helpers to handle http requests.

This package is still pending to be extracted from the Docker engine.

License

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

Related Repositories

list-of-python-api-wrappers

list-of-python-api-wrappers

List of Python API Wrappers and Libraries ...

earthengine-api

earthengine-api

Python and JavaScript bindings for calling the Earth Engine API. ...

engine

engine

Go 3D Game Engine ...

business-rules-engine

business-rules-engine

Business rules engine ...

qsocks

qsocks

A lightweight promise wrapper around the Qlik Sense Engine API ...


Top Contributors

crosbymichael vieux creack LK4D4 calavera shykes tiborvass jamtur01 thaJeztah tianon cpuguy83 icecrime SvenDowideit unclejack duglin vdemeester estesp runcom metalivedev moxiegirl ostezer mzdaniel vbatts dhrp kencochrane aluzzardi shin- ehazlett rhatdan mavenugo

Releases

-   v0.2.0 zip tar
-   v0.1.3 zip tar
-   v0.1.2 zip tar
-   v0.1.1 zip tar
-   v0.1.0 zip tar