MCPcopy
hub / github.com/moby/moby / loadDriver

Method loadDriver

daemon/libnetwork/controller.go:1062–1080  ·  view source on GitHub ↗
(networkType string)

Source from the content-addressed store, hash-verified

1060}
1061
1062func (c *Controller) loadDriver(networkType string) error {
1063 var err error
1064
1065 // TODO(thaJeztah): plugingetter.Get ALSO has a fallback to plugins.Get if allowV1PluginsFallback (const) is true.
1066 if pg := c.GetPluginGetter(); pg != nil {
1067 _, err = pg.Get(networkType, driverapi.NetworkPluginEndpointType, plugingetter.Lookup)
1068 } else {
1069 _, err = plugins.Get(networkType, driverapi.NetworkPluginEndpointType)
1070 }
1071
1072 if err != nil {
1073 if errors.Is(err, plugins.ErrNotFound) {
1074 return errdefs.NotFound(err)
1075 }
1076 return err
1077 }
1078
1079 return nil
1080}
1081
1082func (c *Controller) loadIPAMDriver(name string) error {
1083 var err error

Callers 1

resolveDriverMethod · 0.95

Calls 5

GetPluginGetterMethod · 0.95
GetFunction · 0.92
NotFoundFunction · 0.92
GetMethod · 0.65
IsMethod · 0.45

Tested by

no test coverage detected