Documentation ¶
Index ¶
- type DriverNotifyFunc
- type DriverWalkFunc
- type DrvRegistry
- func (r *DrvRegistry) AddDriver(ntype string, fn InitFunc, config map[string]interface{}) error
- func (r *DrvRegistry) Driver(name string) (driverapi.Driver, *driverapi.Capability)
- func (r *DrvRegistry) GetPluginGetter() plugingetter.PluginGetter
- func (r *DrvRegistry) IPAM(name string) (ipamapi.Ipam, *ipamapi.Capability)
- func (r *DrvRegistry) IPAMDefaultAddressSpaces(name string) (string, string, error)
- func (r *DrvRegistry) RegisterDriver(ntype string, driver driverapi.Driver, capability driverapi.Capability) error
- func (r *DrvRegistry) RegisterIpamDriver(name string, driver ipamapi.Ipam) error
- func (r *DrvRegistry) RegisterIpamDriverWithCapabilities(name string, driver ipamapi.Ipam, caps *ipamapi.Capability) error
- func (r *DrvRegistry) WalkDrivers(dfn DriverWalkFunc)
- func (r *DrvRegistry) WalkIPAMs(ifn IPAMWalkFunc)
- type IPAMNotifyFunc
- type IPAMWalkFunc
- type InitFunc
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 ¶
func New(lDs, gDs interface{}, dfn DriverNotifyFunc, ifn IPAMNotifyFunc, pg plugingetter.PluginGetter) (*DrvRegistry, error)
New returns a new driver registry handle.
func (*DrvRegistry) AddDriver ¶
func (r *DrvRegistry) AddDriver(ntype string, fn InitFunc, config map[string]interface{}) error
AddDriver adds a network driver to the registry.
func (*DrvRegistry) Driver ¶
func (r *DrvRegistry) Driver(name string) (driverapi.Driver, *driverapi.Capability)
Driver returns the actual network driver instance and its capability which registered with the passed name.
func (*DrvRegistry) GetPluginGetter ¶
func (r *DrvRegistry) GetPluginGetter() plugingetter.PluginGetter
GetPluginGetter returns the plugingetter
func (*DrvRegistry) IPAM ¶
func (r *DrvRegistry) IPAM(name string) (ipamapi.Ipam, *ipamapi.Capability)
IPAM returns the actual IPAM driver instance and its capability which registered with the passed name.
func (*DrvRegistry) IPAMDefaultAddressSpaces ¶
func (r *DrvRegistry) IPAMDefaultAddressSpaces(name string) (string, string, error)
IPAMDefaultAddressSpaces returns the default address space strings for the passed IPAM driver name.
func (*DrvRegistry) RegisterDriver ¶
func (r *DrvRegistry) RegisterDriver(ntype string, driver driverapi.Driver, capability driverapi.Capability) error
RegisterDriver registers the network driver when it gets discovered.
func (*DrvRegistry) RegisterIpamDriver ¶
func (r *DrvRegistry) RegisterIpamDriver(name string, driver ipamapi.Ipam) error
RegisterIpamDriver registers the IPAM driver discovered with default capabilities.
func (*DrvRegistry) RegisterIpamDriverWithCapabilities ¶
func (r *DrvRegistry) RegisterIpamDriverWithCapabilities(name string, driver ipamapi.Ipam, caps *ipamapi.Capability) error
RegisterIpamDriverWithCapabilities registers the IPAM driver discovered with specified capabilities.
func (*DrvRegistry) WalkDrivers ¶
func (r *DrvRegistry) WalkDrivers(dfn DriverWalkFunc)
WalkDrivers walks the network drivers registered in the registry and invokes the passed walk function and each one of them.
func (*DrvRegistry) WalkIPAMs ¶
func (r *DrvRegistry) WalkIPAMs(ifn IPAMWalkFunc)
WalkIPAMs walks the IPAM drivers registered in the registry and invokes the passed walk function and each one of them.
type IPAMNotifyFunc ¶
IPAMNotifyFunc defines the notify function signature when a new IPAM driver gets registered.
type IPAMWalkFunc ¶
IPAMWalkFunc defines the IPAM driver table walker function signature.