mapping

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mapping provides utilities for mapping between ENI IDs, interface names, and PCI addresses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterfaceMapping

type InterfaceMapping struct {
	ENIID       string `json:"eniID"`
	IfaceName   string `json:"ifaceName"`
	PCIAddress  string `json:"pciAddress"`
	DeviceIndex int    `json:"deviceIndex"`
	DPDKBound   bool   `json:"dpdkBound"`
	DPDKDriver  string `json:"dpdkDriver"`
	NodeENIName string `json:"nodeENIName"`
}

InterfaceMapping represents the mapping between ENI IDs, interface names, and PCI addresses

type InterfaceMappingStore

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

InterfaceMappingStore is a persistent store for interface mappings

func NewInterfaceMappingStore

func NewInterfaceMappingStore(filePath string) (*InterfaceMappingStore, error)

NewInterfaceMappingStore creates a new interface mapping store

func (*InterfaceMappingStore) AddMapping

func (s *InterfaceMappingStore) AddMapping(mapping InterfaceMapping) error

AddMapping adds a new mapping to the store

func (*InterfaceMappingStore) GetAllMappings

func (s *InterfaceMappingStore) GetAllMappings() []InterfaceMapping

GetAllMappings returns all mappings in the store

func (*InterfaceMappingStore) GetMappingByENIID

func (s *InterfaceMappingStore) GetMappingByENIID(eniID string) (InterfaceMapping, bool)

GetMappingByENIID gets a mapping by ENI ID

func (*InterfaceMappingStore) GetMappingByInterfaceName

func (s *InterfaceMappingStore) GetMappingByInterfaceName(ifaceName string) (InterfaceMapping, bool)

GetMappingByInterfaceName gets a mapping by interface name

func (*InterfaceMappingStore) GetMappingByPCIAddress

func (s *InterfaceMappingStore) GetMappingByPCIAddress(pciAddress string) (InterfaceMapping, bool)

GetMappingByPCIAddress gets a mapping by PCI address

func (*InterfaceMappingStore) RemoveMapping

func (s *InterfaceMappingStore) RemoveMapping(eniID string) error

RemoveMapping removes a mapping from the store

func (*InterfaceMappingStore) UpdateMapping

func (s *InterfaceMappingStore) UpdateMapping(mapping InterfaceMapping) error

UpdateMapping updates an existing mapping

Jump to

Keyboard shortcuts

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