Documentation ¶
Overview ¶
Package fake is a fake datapath implementation. It does not implement any datapath specific concepts and is useful for mocking and testing.
Index ¶
- Variables
- type Sysctl
- func (sysctl *Sysctl) ApplySettings(sysSettings []tables.Sysctl) error
- func (sysctl *Sysctl) Disable(name []string) error
- func (sysctl *Sysctl) Enable(name []string) error
- func (sysctl *Sysctl) Read(name []string) (string, error)
- func (sysctl *Sysctl) ReadInt(name []string) (int64, error)
- func (sysctl *Sysctl) Write(name []string, val string) error
- func (sysctl *Sysctl) WriteInt(name []string, val int64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Cell = cell.Module( "fake-datapath", "Fake Datapath", cell.Provide( func(na types.NodeAddressing) (*fakeTypes.FakeDatapath, types.Datapath, types.NodeIDHandler) { dp := fakeTypes.NewDatapathWithNodeAddressing(na) return dp, dp, dp.NodeIDs() }, func() signalmap.Map { return fakesignalmap.NewFakeSignalMap([][]byte{}, time.Second) }, func() authmap.Map { return fakeauthmap.NewFakeAuthMap() }, func() egressmap.PolicyMap { return nil }, func() *bigtcp.Configuration { return &bigtcp.Configuration{} }, func() *iptables.Manager { return &iptables.Manager{} }, func() ipset.Manager { return &fakeTypes.IPSet{} }, func() types.BandwidthManager { return &fakeTypes.BandwidthManager{} }, func() types.IPsecKeyCustodian { return &ipsecKeyCustodian{} }, func() mtu.MTU { return &fakeTypes.MTU{} }, func() *wg.Agent { return nil }, func() types.Loader { return &fakeTypes.FakeLoader{} }, loader.NewCompilationLock, func() sysctl.Sysctl { return &Sysctl{} }, func() (promise.Promise[nat.NatMap4], promise.Promise[nat.NatMap6]) { r4, p4 := promise.New[nat.NatMap4]() r6, p6 := promise.New[nat.NatMap6]() r4.Reject(nat.MapDisabled) r6.Reject(nat.MapDisabled) return p4, p6 }, tables.NewDeviceTable, tables.NewL2AnnounceTable, statedb.RWTable[*tables.L2AnnounceEntry].ToTable, tables.NewRouteTable, statedb.RWTable[*tables.Route].ToTable, ), tables.NodeAddressCell, datapath.NodeAddressingCell, cell.Invoke( statedb.RegisterTable[*tables.Device], statedb.RegisterTable[*tables.L2AnnounceEntry], statedb.RegisterTable[*tables.Route], ), tunnel.Cell, cell.Provide(fakeDevices), )
Cell provides a fake version of the datapath cell.
Used in integration tests in daemon/cmd and test/controlplane.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.