d519bde5da
...which ignore the config argument. Notably, none of the network drivers referenced by Swarmkit use config, which is good as Swarmkit unconditionally passes nil for the config when registering drivers. Signed-off-by: Cory Snider <csnider@mirantis.com>
26 lines
769 B
Go
26 lines
769 B
Go
package libnetwork
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/docker/docker/libnetwork/driverapi"
|
|
"github.com/docker/docker/libnetwork/drivers/null"
|
|
"github.com/docker/docker/libnetwork/drivers/windows"
|
|
"github.com/docker/docker/libnetwork/drivers/windows/overlay"
|
|
)
|
|
|
|
func registerNetworkDrivers(r driverapi.Registerer, driverConfig func(string) map[string]interface{}) error {
|
|
for _, nr := range []struct {
|
|
ntype string
|
|
register func(driverapi.Registerer) error
|
|
}{
|
|
{ntype: null.NetworkType, register: null.Register},
|
|
{ntype: overlay.NetworkType, register: overlay.Register},
|
|
} {
|
|
if err := nr.register(r); err != nil {
|
|
return fmt.Errorf("failed to register %q driver: %w", nr.ntype, err)
|
|
}
|
|
}
|
|
|
|
return windows.RegisterBuiltinLocalDrivers(r, driverConfig)
|
|
}
|