package drvregistry

import "github.com/docker/docker/libnetwork/drvregistry"

Index

Types

type DriverWalkFunc

type DriverWalkFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) bool

DriverWalkFunc defines the network driver table walker function signature.

type IPAMWalkFunc

type IPAMWalkFunc func(name string, driver ipamapi.Ipam, cap *ipamapi.Capability) bool

IPAMWalkFunc defines the IPAM driver table walker function signature.

type IPAMs

type IPAMs struct {
	// contains filtered or unexported fields
}

IPAMs is a registry of IPAM drivers. The zero value is an empty IPAM driver registry, ready to use.

func (*IPAMs) IPAM

func (ir *IPAMs) IPAM(name string) (ipamapi.Ipam, *ipamapi.Capability)

IPAM returns the actual IPAM driver instance and its capability which registered with the passed name.

func (*IPAMs) RegisterIpamDriver

func (ir *IPAMs) RegisterIpamDriver(name string, driver ipamapi.Ipam) error

RegisterIpamDriver registers the IPAM driver discovered with default capabilities.

func (*IPAMs) RegisterIpamDriverWithCapabilities

func (ir *IPAMs) RegisterIpamDriverWithCapabilities(name string, driver ipamapi.Ipam, caps *ipamapi.Capability) error

RegisterIpamDriverWithCapabilities registers the IPAM driver discovered with specified capabilities.

func (*IPAMs) WalkIPAMs

func (ir *IPAMs) WalkIPAMs(ifn IPAMWalkFunc)

WalkIPAMs walks the IPAM drivers registered in the registry and invokes the passed walk function and each one of them.

type Networks

type Networks struct {
	// Notify is called whenever a network driver is registered.
	Notify driverapi.Registerer
	// contains filtered or unexported fields
}

Networks is a registry of network drivers. The zero value is an empty network driver registry, ready to use.

func (*Networks) Driver

func (nr *Networks) Driver(name string) (driverapi.Driver, driverapi.Capability)

Driver returns the network driver instance registered under name, and its capability.

func (*Networks) RegisterDriver

func (nr *Networks) RegisterDriver(ntype string, driver driverapi.Driver, capability driverapi.Capability) error

RegisterDriver registers the network driver with nr.

func (*Networks) WalkDrivers

func (nr *Networks) WalkDrivers(dfn DriverWalkFunc)

WalkDrivers walks the network drivers registered in the registry and invokes the passed walk function and each one of them.

Source Files

ipams.go networks.go

Version
v27.0.1+incompatible
Published
Jun 21, 2024
Platform
js/wasm
Imports
6 packages
Last checked
1 minute ago

Tools for package owners.