Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion plugin/networkinterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package plugin

import (
"context"
"net/netip"
)

type NetworkInterfaceState string
Expand Down Expand Up @@ -38,11 +39,18 @@ type NetworkInterfaceSpec struct {
Ips []string `json:"ips"`
}

// NetworkInterfaceStatus is returned by a plugin after successfully applying a
// network interface. It contains the effective configuration of the interface
// and the device type that the hypervisor can consume. A plugin must exactly
// one non-nil device type.
type NetworkInterfaceStatus struct {
Name string `json:"name"`
Handle string `json:"handle"`
State NetworkInterfaceState `json:"state"`

Prefixes netip.Prefix `json:"prefixes"`
Ips []netip.Addr `json:"ips"`
VirtualIp netip.Addr `json:"virtual-ip"`

PCI *PCI
TAP *TAP
Netdev *Netdev
Expand Down
Loading