Skip to content

gopher-net/dknet

Repository files navigation

Docker network extension api

This repository is no longer maintained Please use https://github.com/docker/go-plugins-helpers

Go handler to create external network extensions for Docker. Inspired by @calavera's awesome dkvolume library

Usage

This library is designed to be integrated in your program.

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

Example using TCP sockets:

  d := MyNetworkDriver{}
  h := dknet.NewHandler(d)
  h.ServeTCP("test_network", ":8080")

Example using Unix sockets:

  d := MyNetworkDriver{}
  h := dknet.NewHandler(d)
  h.ServeUnix("root", "test_network")

Full example plugins

License

MIT