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(lifecycle cell.Lifecycle, na types.NodeAddressing, nodeManager manager.NodeManager) (types.NodeIDHandler, types.NodeHandler, *fakeTypes.FakeNodeHandler) { fakeNodeHandler := fakeTypes.NewNodeHandler() nodeManager.Subscribe(fakeNodeHandler) return fakeNodeHandler, fakeNodeHandler, fakeNodeHandler }, func() signalmap.Map { return fakesignalmap.NewFakeSignalMap([][]byte{}, time.Second) }, func() authmap.Map { return fakeauthmap.NewFakeAuthMap() }, func() encrypt.EncryptMap { return fakeencryptmap.NewFakeEncryptMap() }, func() *egressmap.PolicyMap4 { return nil }, func() *egressmap.PolicyMap6 { return nil }, func() lxcmap.Map { return nil }, func() *bigtcp.Configuration { return &bigtcp.Configuration{} }, func() types.IptablesManager { return &fakeTypes.FakeIptablesManager{} }, func() ipset.Manager { return &fakeTypes.IPSet{} }, func() types.BandwidthManager { return &fakeTypes.BandwidthManager{} }, func() types.IPsecAgent { return &fakeTypes.IPsecAgent{} }, func() types.IPsecConfig { return &fakeTypes.IPsecConfig{} }, func() mtu.MTU { return &fakeTypes.MTU{} }, func() wgTypes.WireguardAgent { return &fakeTypes.WireguardAgent{} }, func() wgTypes.WireguardConfig { return &fakeTypes.WireguardConfig{} }, func() types.Loader { return &fakeTypes.FakeLoader{} }, func() types.Orchestrator { return &fakeTypes.FakeOrchestrator{} }, loader.NewCompilationLock, func() sysctl.Sysctl { return &Sysctl{} }, func() (nat.NatMap4, nat.NatMap6) { return nil, nil }, tables.NewDeviceTable, tables.NewL2AnnounceTable, statedb.RWTable[*tables.L2AnnounceEntry].ToTable, tables.NewRouteTable, statedb.RWTable[*tables.Route].ToTable, func() types.BigTCPConfig { return &fakeTypes.BigTCPUserConfig{} }, func() gneigh.L2PodAnnouncementConfig { return &fakeTypes.GNeighConfig{} }, ), tables.NodeAddressCell, datapath.NodeAddressingCell, tables.DirectRoutingDeviceCell, tunnel.Cell, cell.Provide(fakeDevices), link.Cell, )
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.