MCPcopy
hub / github.com/moby/moby / pluginRefCount

Method pluginRefCount

daemon/network.go:433–455  ·  view source on GitHub ↗
(driver, capability string, mode int)

Source from the content-addressed store, hash-verified

431}
432
433func (daemon *Daemon) pluginRefCount(driver, capability string, mode int) {
434 var builtinDrivers []string
435
436 switch capability {
437 case driverapi.NetworkPluginEndpointType:
438 builtinDrivers = daemon.netController.BuiltinDrivers()
439 case ipamapi.PluginEndpointType:
440 builtinDrivers = daemon.netController.BuiltinIPAMDrivers()
441 default:
442 // other capabilities can be ignored for now
443 }
444
445 if slices.Contains(builtinDrivers, driver) {
446 return
447 }
448
449 if daemon.PluginStore != nil {
450 _, err := daemon.PluginStore.Get(driver, capability, mode)
451 if err != nil {
452 log.G(context.TODO()).WithError(err).WithFields(log.Fields{"mode": mode, "driver": driver}).Error("Error handling plugin refcount operation")
453 }
454 }
455}
456
457func validateIpamConfig(data []networktypes.IPAMConfig, enableIPv6 bool) error {
458 var errs []error

Callers 2

createNetworkMethod · 0.95
deleteNetworkMethod · 0.95

Calls 5

BuiltinDriversMethod · 0.80
BuiltinIPAMDriversMethod · 0.80
GetMethod · 0.65
ContainsMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected