package
0.0.0-20240701071450-45e2431495c8
Repository: https://github.com/docker/go-plugins-helpers.git
Documentation: pkg.go.dev
# 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.
- Implement the
ipam.Driver
interface. - Initialize a
ipam.Handler
with your implementation. - Call either
ServeTCP
orServeUnix
from theipam.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")