Documentation ¶
Index ¶
- type DriverNotifyFunc
- type DriverWalkFunc
- type DrvRegistry
- func (r *DrvRegistry) AddDriver(_ string, fn InitFunc, config map[string]interface{}) errordeprecated
- func (r *DrvRegistry) Driver(name string) (driverapi.Driver, *driverapi.Capability)
- func (r *DrvRegistry) GetPluginGetter() plugingetter.PluginGetter
- func (r *DrvRegistry) IPAMDefaultAddressSpaces(name string) (string, string, error)deprecated
- type IPAMWalkFunc
- type IPAMs
- func (ir *IPAMs) IPAM(name string) (ipamapi.Ipam, *ipamapi.Capability)
- func (ir *IPAMs) RegisterIpamDriver(name string, driver ipamapi.Ipam) error
- func (ir *IPAMs) RegisterIpamDriverWithCapabilities(name string, driver ipamapi.Ipam, caps *ipamapi.Capability) error
- func (ir *IPAMs) WalkIPAMs(ifn IPAMWalkFunc)
- type InitFunc
- type Networks
- type Placeholder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverNotifyFunc ¶
type DriverNotifyFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) error
DriverNotifyFunc defines the notify function signature when a new network driver gets registered.
type DriverWalkFunc ¶
type DriverWalkFunc func(name string, driver driverapi.Driver, capability driverapi.Capability) bool
DriverWalkFunc defines the network driver table walker function signature.
type DrvRegistry ¶
DrvRegistry holds the registry of all network drivers and IPAM drivers that it knows about.
func New
deprecated
func New(lDs, gDs Placeholder, dfn DriverNotifyFunc, ifn Placeholder, pg plugingetter.PluginGetter) (*DrvRegistry, error)
New returns a new legacy driver registry.
func (*DrvRegistry) Driver ¶
func (r *DrvRegistry) Driver(name string) (driverapi.Driver, *driverapi.Capability)
Driver returns the network driver instance registered under name, and its capability.
func (*DrvRegistry) GetPluginGetter ¶
func (r *DrvRegistry) GetPluginGetter() plugingetter.PluginGetter
GetPluginGetter returns the plugingetter
func (*DrvRegistry) IPAMDefaultAddressSpaces
deprecated
func (r *DrvRegistry) IPAMDefaultAddressSpaces(name string) (string, string, error)
IPAMDefaultAddressSpaces returns the default address space strings for the passed IPAM driver name.
Deprecated: call GetDefaultAddressSpaces() on the IPAM driver.
type IPAMWalkFunc ¶
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 ¶
IPAM returns the actual IPAM driver instance and its capability which registered with the passed name.
func (*IPAMs) RegisterIpamDriver ¶
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 InitFunc ¶
type InitFunc func(driverapi.DriverCallback, map[string]interface{}) error
InitFunc defines the driver initialization function signature.
type Networks ¶
type Networks struct { // Notify is called whenever a network driver is registered. Notify DriverNotifyFunc // 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 ¶
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.
type Placeholder ¶
type Placeholder *struct{}
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.