Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DeviceIDIndex = statedb.Index[*Device, int]{ Name: "id", FromObject: func(d *Device) index.KeySet { return index.NewKeySet(index.Int(d.Index)) }, FromKey: func(idx int) []byte { return index.Int(idx) }, Unique: true, } DeviceNameIndex = statedb.Index[*Device, string]{ Name: "name", FromObject: func(d *Device) index.KeySet { return index.NewKeySet(index.String(d.Name)) }, FromKey: func(name string) []byte { return index.String(name) }, } DeviceSelectedIndex = statedb.Index[*Device, bool]{ Name: "selected", FromObject: func(d *Device) index.KeySet { return index.NewKeySet(index.Bool(d.Selected)) }, FromKey: func(selected bool) []byte { return index.Bool(selected) }, } DeviceTableCell = statedb.NewTableCell[*Device]( "devices", DeviceIDIndex, DeviceNameIndex, DeviceSelectedIndex, ) )
View Source
var ( L2AnnounceIDIndex = statedb.Index[*L2AnnounceEntry, L2AnnounceKey]{ Name: "id", FromObject: func(b *L2AnnounceEntry) index.KeySet { return index.NewKeySet(b.Key()) }, FromKey: func(id L2AnnounceKey) []byte { return id.Key() }, Unique: true, } L2AnnounceOriginIndex = statedb.Index[*L2AnnounceEntry, resource.Key]{ Name: "origin", FromObject: func(b *L2AnnounceEntry) index.KeySet { return index.StringerSlice(b.Origins) }, FromKey: func(id resource.Key) []byte { return index.Stringer(id) }, } L2AnnounceTableCell = statedb.NewTableCell[*L2AnnounceEntry]( "l2-announce", L2AnnounceIDIndex, L2AnnounceOriginIndex, ) )
View Source
var ( RouteIDIndex = statedb.Index[*Route, RouteID]{ Name: "id", FromObject: func(r *Route) index.KeySet { return index.NewKeySet( RouteID{ Table: r.Table, LinkIndex: r.LinkIndex, Dst: r.Dst, }.Key(), ) }, FromKey: func(id RouteID) []byte { return id.Key() }, Unique: true, } RouteLinkIndex = statedb.Index[*Route, int]{ Name: "LinkIndex", FromObject: func(r *Route) index.KeySet { return index.NewKeySet(index.Int(r.LinkIndex)) }, FromKey: func(linkIndex int) []byte { return index.Int(linkIndex) }, } RouteTableCell = statedb.NewTableCell[*Route]( "routes", RouteIDIndex, RouteLinkIndex, ) )
View Source
var Cell = cell.Module( "datapath-tables", "Datapath state tables", L2AnnounceTableCell, DeviceTableCell, RouteTableCell, )
Functions ¶
func DeviceNames ¶
DeviceNames extracts the device names from a slice of devices.
Types ¶
type Device ¶
type Device struct { Index int // positive integer that starts at one, zero is never used MTU int // maximum transmission unit Name string // e.g., "en0", "lo0", "eth0.100" HardwareAddr net.HardwareAddr // IEEE MAC-48, EUI-48 and EUI-64 form Flags net.Flags // e.g. net.FlagUp, net.eFlagLoopback, net.FlagMulticast Selected bool // If true this device can be used by Cilium Addrs []DeviceAddress // Addresses assigned to the device RawFlags uint32 // Raw interface flags Type string // Device type, e.g. "veth" etc. MasterIndex int // Index of the master device (e.g. bridge or bonding device) }
Device is a local network device along with addresses associated with it.
func SelectedDevices ¶
SelectedDevices returns the network devices selected for Cilium use.
The invalidated channel is closed when devices have changed and should be requeried with a new transaction.
type DeviceAddress ¶
func (*DeviceAddress) AsIP ¶
func (d *DeviceAddress) AsIP() net.IP
type L2AnnounceEntry ¶
type L2AnnounceEntry struct { L2AnnounceKey // The key of the services for which this proxy entry was added Origins []resource.Key }
func (*L2AnnounceEntry) DeepCopy ¶
func (pne *L2AnnounceEntry) DeepCopy() *L2AnnounceEntry
type L2AnnounceKey ¶
type L2AnnounceKey struct { // IP and network interface are the primary key of this entry IP netip.Addr NetworkInterface string }
func (L2AnnounceKey) Key ¶
func (k L2AnnounceKey) Key() []byte
Click to show internal directories.
Click to hide internal directories.