ndmz

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

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
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPMon added in v0.4.9

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

DHCPMon monitor a network interface status and force renew of DHCP lease if needed

func NewDHCPMon added in v0.4.9

func NewDHCPMon(iface, namespace string, z *zinit.Client) *DHCPMon

NewDHCPMon create a new DHCPMon object managing interface iface namespace is then network namespace name to use. it can be empty.

func (*DHCPMon) Start added in v0.4.9

func (d *DHCPMon) Start(ctx context.Context) error

Start creates a zinit service for a DHCP client and start monitoring it this method is blocking, start is in a goroutine if needed. cancel the context to start it.

type DMZ added in v0.4.0

type DMZ interface {
	// 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 string, nr *nr.NetResource, ipamLeaseDir string) error
	// configure an address on the public IPv6 interface
	SetIP(net.IPNet) error
	// GetIP gets ndmz public ips from ndmz
	GetIP(family int) ([]net.IPNet, error)

	GetIPFor(inf string) ([]net.IPNet, error)
	//GetIP(family netlink.FAM)
	// SupportsPubIPv4 indicates if the node supports public ipv4 addresses for
	// workloads
	SupportsPubIPv4() bool

	//IsIPv4Only checks if dmz is ipv4 only (no ipv6 support)
	IsIPv4Only() (bool, error)

	//Interfaces information about dmz interfaces
	Interfaces() ([]types.IfaceInfo, error)
}

DMZ is an interface used to create an DMZ network namespace

func New added in v0.4.9

func New(nodeID string, public *netlink.Bridge) DMZ

New creates a new DMZ DualStack

Jump to

Keyboard shortcuts

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