network

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewK8sClient

func NewK8sClient() nodeClient
func NewNetlink() netlinker

NewNetlink creates an instance of netlinker.

Types

type MetadataClient

type MetadataClient interface {
	GetNetworkInterfaces() ([]metadata.NetworkInterface, error)
}

MetadataClient abstracts the metadata service.

type RouteManager

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

RouteManager provides methods for network configuration using the netlinker interface.

func Manager

func Manager(nl netlinker, nc nodeClient, mc MetadataClient) *RouteManager

func (*RouteManager) CheckDisableMultiNIC

func (rm *RouteManager) CheckDisableMultiNIC(ctx context.Context, nodeID string, nics []string, disableMultiNIC bool) (bool, error)

CheckDisableMultiNIC checks for Multi-NIC feature via node label and cluster configuration. return true if disabled. return false if multi nic is enabled. if node label is specified, then it overrides cluster configuration for multi nic setup.

func (*RouteManager) ConfigureRoute

func (rm *RouteManager) ConfigureRoute(nicName string, instanceIP string, tableID int) error

ConfigureRoute configures route between Lustre Instance and NIC on an available Table ID.

func (*RouteManager) FindNextFreeTableID

func (rm *RouteManager) FindNextFreeTableID(startID int, nicIPAddr net.IP) (int, error)

FindNextFreeTableID finds available Table ID for NIC confiugration.

func (*RouteManager) GetNICIPAddr

func (rm *RouteManager) GetNICIPAddr(nicName string) (net.IP, error)

GetNICIPAddr gets primary IP Address of NIC.

func (*RouteManager) GetStandardNICs

func (rm *RouteManager) GetStandardNICs() ([]string, error)

GetStandardNICs gets all standard NICs on the node which are within the same VPC network as the GCE instance primary network.

Jump to

Keyboard shortcuts

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