drvregistry

package
v27.0.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL