summaryrefslogtreecommitdiff
path: root/libnetwork/drvregistry
diff options
context:
space:
mode:
authorCory Snider <csnider@mirantis.com>2023-01-23 18:05:46 -0500
committerCory Snider <csnider@mirantis.com>2023-01-26 17:56:40 -0500
commit27cca19c9a907abbfbc4c319d35c321ba536869b (patch)
treee91bdb71aa8a9adee842307614ad2ef5fabee2af /libnetwork/drvregistry
parentbefff0e13f68d39fed40e9f81bafc25042e944da (diff)
downloaddocker-27cca19c9a907abbfbc4c319d35c321ba536869b.tar.gz
libnetwork/drvregistry: drop unused args
Signed-off-by: Cory Snider <csnider@mirantis.com>
Diffstat (limited to 'libnetwork/drvregistry')
-rw-r--r--libnetwork/drvregistry/drvregistry.go17
1 files changed, 5 insertions, 12 deletions
diff --git a/libnetwork/drvregistry/drvregistry.go b/libnetwork/drvregistry/drvregistry.go
index 9063c472bf..fc54095ca0 100644
--- a/libnetwork/drvregistry/drvregistry.go
+++ b/libnetwork/drvregistry/drvregistry.go
@@ -33,7 +33,6 @@ type DrvRegistry struct {
drivers driverTable
ipamDrivers ipamTable
dfn DriverNotifyFunc
- ifn IPAMNotifyFunc
pluginGetter plugingetter.PluginGetter
}
@@ -48,19 +47,19 @@ type IPAMWalkFunc func(name string, driver ipamapi.Ipam, cap *ipamapi.Capability
// DriverWalkFunc defines the network driver table walker function signature.
type DriverWalkFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) bool
-// IPAMNotifyFunc defines the notify function signature when a new IPAM driver gets registered.
-type IPAMNotifyFunc func(name string, driver ipamapi.Ipam, cap *ipamapi.Capability) error
-
// DriverNotifyFunc defines the notify function signature when a new network driver gets registered.
type DriverNotifyFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) error
+// Placeholder is a type for function arguments which need to be present for Swarmkit
+// to compile, but for which the only acceptable value is nil.
+type Placeholder *struct{}
+
// New returns a new driver registry handle.
-func New(lDs, gDs interface{}, dfn DriverNotifyFunc, ifn IPAMNotifyFunc, pg plugingetter.PluginGetter) (*DrvRegistry, error) {
+func New(lDs, gDs Placeholder, dfn DriverNotifyFunc, ifn Placeholder, pg plugingetter.PluginGetter) (*DrvRegistry, error) {
r := &DrvRegistry{
drivers: make(driverTable),
ipamDrivers: make(ipamTable),
dfn: dfn,
- ifn: ifn,
pluginGetter: pg,
}
@@ -204,12 +203,6 @@ func (r *DrvRegistry) registerIpamDriver(name string, driver ipamapi.Ipam, caps
return types.InternalErrorf("ipam driver %q failed to return default address spaces: %v", name, err)
}
- if r.ifn != nil {
- if err := r.ifn(name, driver, caps); err != nil {
- return err
- }
- }
-
r.Lock()
r.ipamDrivers[name] = &ipamData{driver: driver, defaultLocalAddressSpace: locAS, defaultGlobalAddressSpace: glbAS, capability: caps}
r.Unlock()