From be0f4a4737fc02ac4c29b713a15b6800a7c9551c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 29 Jul 2023 00:33:32 +0200 Subject: [PATCH] libnetwork/driver: remove discoverAPI from Windows and Windows overlay Follow-up to fca38bcd0aabcb3ab95705704e6bbc1b317575a4, which made the Discover API optional for drivers to implement, but forgot to remove the stubs from the Windows drivers, which didn't implement this API. Signed-off-by: Sebastiaan van Stijn --- .../drivers/windows/overlay/overlay_windows.go | 12 ------------ libnetwork/drivers/windows/windows.go | 11 ----------- 2 files changed, 23 deletions(-) diff --git a/libnetwork/drivers/windows/overlay/overlay_windows.go b/libnetwork/drivers/windows/overlay/overlay_windows.go index 2d446f5d49..43392672ac 100644 --- a/libnetwork/drivers/windows/overlay/overlay_windows.go +++ b/libnetwork/drivers/windows/overlay/overlay_windows.go @@ -10,10 +10,8 @@ import ( "github.com/Microsoft/hcsshim" "github.com/containerd/containerd/log" - "github.com/docker/docker/libnetwork/discoverapi" "github.com/docker/docker/libnetwork/driverapi" "github.com/docker/docker/libnetwork/scope" - "github.com/docker/docker/libnetwork/types" ) const ( @@ -111,13 +109,3 @@ func (d *driver) Type() string { func (d *driver) IsBuiltIn() bool { return true } - -// DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster -func (d *driver) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error { - return types.NotImplementedErrorf("not implemented") -} - -// DiscoverDelete is a notification for a discovery delete event, such as a node leaving a cluster -func (d *driver) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error { - return types.NotImplementedErrorf("not implemented") -} diff --git a/libnetwork/drivers/windows/windows.go b/libnetwork/drivers/windows/windows.go index 55a29fa1d6..5033ab70e0 100644 --- a/libnetwork/drivers/windows/windows.go +++ b/libnetwork/drivers/windows/windows.go @@ -23,7 +23,6 @@ import ( "github.com/Microsoft/hcsshim" "github.com/containerd/containerd/log" "github.com/docker/docker/libnetwork/datastore" - "github.com/docker/docker/libnetwork/discoverapi" "github.com/docker/docker/libnetwork/driverapi" "github.com/docker/docker/libnetwork/netlabel" "github.com/docker/docker/libnetwork/portmapper" @@ -905,13 +904,3 @@ func (d *driver) Type() string { func (d *driver) IsBuiltIn() bool { return true } - -// DiscoverNew is a notification for a new discovery event, such as a new node joining a cluster -func (d *driver) DiscoverNew(dType discoverapi.DiscoveryType, data interface{}) error { - return nil -} - -// DiscoverDelete is a notification for a discovery delete event, such as a node leaving a cluster -func (d *driver) DiscoverDelete(dType discoverapi.DiscoveryType, data interface{}) error { - return nil -}