danmep

package
v0.0.0-...-330f3ae Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteDanmEp

func DeleteDanmEp(danmClient danmclientset.Interface, ep *danmtypes.DanmEp, dnet *danmtypes.DanmNet) error

DeleteDanmEp selects an ReleaseIPService implementation for allocated IPv4 and IPv6 IP addresses in a given DanmEp and invokes them separately trying ot free up allocated IPs, after successfully freeing up all IPs, it deletes the DanmEp, returns error if unable to free any of the IPs or unable to delete DanmEp

func GetSupportedReleaseIPHandlers

func GetSupportedReleaseIPHandlers(danmClient danmclientset.Interface, dnet *danmtypes.DanmNet, ep *danmtypes.DanmEp) []interface{}

GetSupportedReleaseIPHandlers gets all supported static CNI implementation that cleaner can use when deleting dangling DanmEps

Types

type ReleaseIPInterface

type ReleaseIPInterface interface {
	ReleaseIP(ip string) error
	IsIPAllocatedByMe(ip string) bool
}

ReleaseIPInterface need to be implemented by every static CNI IPAM release plugin that want to invoked when Cleaner is cleaning up dangling DanmEps

func SelectReleaseIpServiceImplementation

func SelectReleaseIpServiceImplementation(danmClient danmclientset.Interface, dnet *danmtypes.DanmNet, ep *danmtypes.DanmEp, ip string) ReleaseIPInterface

SelectReleaseIpServiceImplementation looks up and returns the first suitable ReleaseIP service implementation for given IP address returns nil when no suitable implementation found

Jump to

Keyboard shortcuts

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