Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 941 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 941 Bytes

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