docker: github.com/docker/docker/vendor/github.com/docker/libnetwork/drvregistry Index | Files

package drvregistry

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

Index

Package Files

drvregistry.go

type DriverNotifyFunc Uses

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 Uses

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

DriverWalkFunc defines the network driver table walker function signature.

type DrvRegistry Uses

type DrvRegistry struct {
    sync.Mutex
    // contains filtered or unexported fields
}

DrvRegistry holds the registry of all network drivers and IPAM drivers that it knows about.

func New Uses

func New(lDs, gDs interface{}, dfn DriverNotifyFunc, ifn IPAMNotifyFunc, pg plugingetter.PluginGetter) (*DrvRegistry, error)

New returns a new driver registry handle.

func (*DrvRegistry) AddDriver Uses

func (r *DrvRegistry) AddDriver(ntype string, fn InitFunc, config map[string]interface{}) error

AddDriver adds a network driver to the registry.

func (*DrvRegistry) Driver Uses

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 Uses

func (r *DrvRegistry) GetPluginGetter() plugingetter.PluginGetter

GetPluginGetter returns the plugingetter

func (*DrvRegistry) IPAM Uses

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 Uses

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 Uses

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 Uses

func (r *DrvRegistry) RegisterIpamDriver(name string, driver ipamapi.Ipam) error

RegisterIpamDriver registers the IPAM driver discovered with default capabilities.

func (*DrvRegistry) RegisterIpamDriverWithCapabilities Uses

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 Uses

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 Uses

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 Uses

type IPAMNotifyFunc func(name string, driver ipamapi.Ipam, cap *ipamapi.Capability) error

IPAMNotifyFunc defines the notify function signature when a new IPAM driver gets registered.

type IPAMWalkFunc Uses

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

IPAMWalkFunc defines the IPAM driver table walker function signature.

type InitFunc Uses

type InitFunc func(driverapi.DriverCallback, map[string]interface{}) error

InitFunc defines the driver initialization function signature.

Package drvregistry imports 8 packages (graph). Updated 2018-09-02. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).