# README

Docker IPAM extension API

Go handler to create external IPAM extensions for Docker.

Usage

This library is designed to be integrated in your program.

  1. Implement the ipam.Driver interface.
  2. Initialize a ipam.Handler with your implementation.
  3. Call either ServeTCP or ServeUnix from the ipam.Handler.

Example using TCP sockets:

  import "github.com/docker/go-plugins-helpers/ipam"

  d := MyIPAMDriver{}
  h := ipam.NewHandler(d)
  h.ServeTCP("test_ipam", ":8080")

Example using Unix sockets:

  import "github.com/docker/go-plugins-helpers/ipam"

  d := MyIPAMDriver{}
  h := ipam.NewHandler(d)
  h.ServeUnix("root", "test_ipam")

# Functions

ConfigureHandler adds routes to the sdk.Handler to handle the Ipam plugin API.
NewHandler initializes the request handler with a driver implementation.

# Constants

ImplementationName is the name of the interface all IPAM plugins implement.

# Structs

AddressSpacesResponse returns the default local and global address space names for this IPAM.
CapabilitiesResponse returns whether or not this IPAM required pre-made MAC.
Handler forwards requests and responses between the docker daemon and the plugin.
ReleaseAddressRequest is sent in order to release an address from the pool.
ReleasePoolRequest is sent when releasing a previously registered address pool.
RequestAddressRequest is sent when requesting an address from IPAM.
RequestAddressResponse is formed with allocated address by IPAM.
RequestPoolRequest is sent by the daemon when a pool needs to be created.
RequestPoolResponse returns a registered address pool with the IPAM driver.

# Interfaces

Ipam represent the interface a driver must fulfill.