Documentation
¶
Overview ¶
Package mapping provides utilities for mapping between ENI IDs, interface names, and PCI addresses
Index ¶
- type InterfaceMapping
- type InterfaceMappingStore
- func (s *InterfaceMappingStore) AddMapping(mapping InterfaceMapping) error
- func (s *InterfaceMappingStore) GetAllMappings() []InterfaceMapping
- func (s *InterfaceMappingStore) GetMappingByENIID(eniID string) (InterfaceMapping, bool)
- func (s *InterfaceMappingStore) GetMappingByInterfaceName(ifaceName string) (InterfaceMapping, bool)
- func (s *InterfaceMappingStore) GetMappingByPCIAddress(pciAddress string) (InterfaceMapping, bool)
- func (s *InterfaceMappingStore) RemoveMapping(eniID string) error
- func (s *InterfaceMappingStore) UpdateMapping(mapping InterfaceMapping) error
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