windows.go 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package windows
  2. import (
  3. "github.com/docker/libnetwork/datastore"
  4. "github.com/docker/libnetwork/driverapi"
  5. )
  6. const networkType = "windows"
  7. // TODO Windows. This is a placeholder for now
  8. type driver struct{}
  9. // Init registers a new instance of null driver
  10. func Init(dc driverapi.DriverCallback, config map[string]interface{}) error {
  11. c := driverapi.Capability{
  12. DataScope: datastore.LocalScope,
  13. }
  14. return dc.RegisterDriver(networkType, &driver{}, c)
  15. }
  16. func (d *driver) CreateNetwork(id string, option map[string]interface{}, ipV4Data, ipV6Data []driverapi.IPAMData) error {
  17. return nil
  18. }
  19. func (d *driver) DeleteNetwork(nid string) error {
  20. return nil
  21. }
  22. func (d *driver) CreateEndpoint(nid, eid string, ifInfo driverapi.InterfaceInfo, epOptions map[string]interface{}) error {
  23. return nil
  24. }
  25. func (d *driver) DeleteEndpoint(nid, eid string) error {
  26. return nil
  27. }
  28. func (d *driver) EndpointOperInfo(nid, eid string) (map[string]interface{}, error) {
  29. return make(map[string]interface{}, 0), nil
  30. }
  31. // Join method is invoked when a Sandbox is attached to an endpoint.
  32. func (d *driver) Join(nid, eid string, sboxKey string, jinfo driverapi.JoinInfo, options map[string]interface{}) error {
  33. return nil
  34. }
  35. // Leave method is invoked when a Sandbox detaches from an endpoint.
  36. func (d *driver) Leave(nid, eid string) error {
  37. return nil
  38. }
  39. func (d *driver) Type() string {
  40. return networkType
  41. }
  42. // DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster
  43. func (d *driver) DiscoverNew(dType driverapi.DiscoveryType, data interface{}) error {
  44. return nil
  45. }
  46. // DiscoverDelete is a notification for a discovery delete event, such as a node leaving a cluster
  47. func (d *driver) DiscoverDelete(dType driverapi.DiscoveryType, data interface{}) error {
  48. return nil
  49. }