Documentation
¶
Index ¶
Constants ¶
View Source
const ( // FamilyAll get all IP address families FamilyAll = netlink.FAMILY_ALL //FamilyV4 gets all IPv4 addresses FamilyV4 = netlink.FAMILY_V4 //FamilyV6 gets all IPv6 addresses FamilyV6 = netlink.FAMILY_V6 )
View Source
const (
//NdmzBridge is the name of the ipv4 routing bridge in the host namespace
NdmzBridge = "br-ndmz"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DHCPMon ¶
type DHCPMon struct {
// contains filtered or unexported fields
}
DHCPMon monitor a network interface status and force renew of DHCP lease if needed
func NewDHCPMon ¶
NewDHCPMon create a new DHCPMon object managing interface iface namespace is then network namespace name to use. it can be empty.
type DMZ ¶
type DMZ interface {
Namespace() string
// create the ndmz network namespace and all requires network interfaces
Create(ctx context.Context) error
// delete the ndmz network namespace and clean up all network interfaces
Delete() error
// link a network resource from a user network to ndmz
AttachNR(networkID, nr, ipamLeaseDir string) error
DetachNR(networkID, ipamLeaseDir string) error
// GetIP gets ndmz public ips from ndmz
GetIP(family int) ([]net.IPNet, error)
// Get gateway to given destination ip
GetDefaultGateway(destination net.IP) (net.IP, error)
// GetIPFor get the ip of an
GetIPFor(inf string) ([]net.IPNet, error)
//GetIP(family netlink.FAM)
// SupportsPubIPv4 indicates if the node supports public ipv4 addresses for
// workloads
SupportsPubIPv4() bool
//Interfaces information about dmz interfaces
Interfaces() ([]types.IfaceInfo, error)
}
DMZ is an interface used to create an DMZ network namespace
Click to show internal directories.
Click to hide internal directories.