descriptor

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 7 Imported by: 12 modules, 55 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// IPAllocDescriptorName is the name of the descriptor for allocating
	// IP addresses.
	IPAllocDescriptorName = "netalloc-ip-address"
)

Variables

This section is empty.

Functions

func NewAddrAllocDescriptor

func NewAddrAllocDescriptor(log logging.PluginLogger) (descr *kvs.KVDescriptor)

NewAddrAllocDescriptor creates a new instance of IPAllocDescriptor.

Types

type IPAllocDescriptor

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

IPAllocDescriptor just validates and parses allocated IP addresses.

func (*IPAllocDescriptor) Create

func (d *IPAllocDescriptor) Create(key string, addrAlloc *netalloc.IPAllocation) (metadata *netalloc.IPAllocMetadata, err error)

Create parses the address and stores it into the metadata.

func (*IPAllocDescriptor) Delete

func (d *IPAllocDescriptor) Delete(key string, addrAlloc *netalloc.IPAllocation, metadata *netalloc.IPAllocMetadata) (err error)

Delete is NOOP.

func (*IPAllocDescriptor) DerivedValues

func (d *IPAllocDescriptor) DerivedValues(key string, addrAlloc *netalloc.IPAllocation) (derValues []kvs.KeyValuePair)

DerivedValues derives "neighbour-gateway" key if GW is a neighbour of the interface (addresses are from the same IP network).

func (*IPAllocDescriptor) Retrieve

func (d *IPAllocDescriptor) Retrieve(correlate []adapter.IPAllocKVWithMetadata) (valid []adapter.IPAllocKVWithMetadata, err error)

Retrieve always returns what is expected to exists since Create doesn't really change anything in SB.

func (*IPAllocDescriptor) Validate

func (d *IPAllocDescriptor) Validate(key string, addrAlloc *netalloc.IPAllocation) (err error)

Validate checks if the address can be parsed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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