Documentation
¶
Index ¶
- type DB
- func (db *DB) AddPodNetNs(pod string, netNsPath string)
- func (db *DB) GetDevice(deviceName string) (resourceapi.Device, bool)
- func (db *DB) GetNetInterfaceName(deviceName string) (string, error)
- func (db *DB) GetPodNetNs(pod string) string
- func (db *DB) GetResources(ctx context.Context) <-chan []resourceapi.Device
- func (db *DB) RemovePodNetNs(pod string)
- func (db *DB) Run(ctx context.Context) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) AddPodNetNs ¶ added in v0.7.0
func (*DB) GetDevice ¶ added in v0.7.0
func (db *DB) GetDevice(deviceName string) (resourceapi.Device, bool)
func (*DB) GetNetInterfaceName ¶ added in v0.7.0
GetNetInterfaceName returns the network interface name for a given device. It first attempts to retrieve the name from the local device store. If the device is not found, it triggers a rescan of the system's devices and retries the lookup. This can happen when a device was recently released by a previous pod and a scan had not happened yet. This ensures that the function can find newly added devices that were not present in the store at the time of the initial call.
func (*DB) GetPodNetNs ¶ added in v0.7.0
GetPodNamespace allows to get the Pod network namespace
func (*DB) GetResources ¶
func (db *DB) GetResources(ctx context.Context) <-chan []resourceapi.Device
func (*DB) RemovePodNetNs ¶ added in v0.7.0
Click to show internal directories.
Click to hide internal directories.