Documentation ¶
Index ¶
- func LookPathAll(p string) (string, error)
- func LookPathNoLegacy(p string) (string, error)
- func PrependLine(src []string, line string) []string
- type MockDataplane
- func (d *MockDataplane) AdvanceTimeBy(amount time.Duration)
- func (d *MockDataplane) ChainFlushed(chainName string) bool
- func (d *MockDataplane) GetKernelVersionReader() (io.Reader, error)
- func (d *MockDataplane) NewCmd(name string, arg ...string) cmdshim.CmdIface
- func (d *MockDataplane) Now() time.Time
- func (d *MockDataplane) ResetCmds()
- func (d *MockDataplane) RuleTouched(chainName string, ruleNum int) bool
- func (d *MockDataplane) Sleep(duration time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LookPathAll ¶
func LookPathNoLegacy ¶
func PrependLine ¶
Types ¶
type MockDataplane ¶
type MockDataplane struct { Prologue string Table string Chains map[string][]string FlushedChains set.Set[string] ChainMods set.Set[chainMod] DeletedChains set.Set[string] Cmds []cmdshim.CmdIface CmdNames []string FailNextRestore bool FailAllRestores bool OnPreSave func() OnPreRestore func() FailNextSaveRead bool FailNextSaveStdoutPipe bool FailNextKill bool FailAllSaves bool FailNextPipeClose bool FailNextStart bool FailNextGetKernelVersionReader bool PipeBuffers []*closableBuffer CumulativeSleep time.Duration Time time.Time FailNextVersion bool Version string KernelVersion string NftablesMode bool }
func NewMockDataplane ¶
func NewMockDataplane(table string, chains map[string][]string, dataplaneMode string) *MockDataplane
func (*MockDataplane) AdvanceTimeBy ¶
func (d *MockDataplane) AdvanceTimeBy(amount time.Duration)
func (*MockDataplane) ChainFlushed ¶
func (d *MockDataplane) ChainFlushed(chainName string) bool
func (*MockDataplane) GetKernelVersionReader ¶
func (d *MockDataplane) GetKernelVersionReader() (io.Reader, error)
func (*MockDataplane) NewCmd ¶
func (d *MockDataplane) NewCmd(name string, arg ...string) cmdshim.CmdIface
func (*MockDataplane) Now ¶
func (d *MockDataplane) Now() time.Time
func (*MockDataplane) ResetCmds ¶
func (d *MockDataplane) ResetCmds()
func (*MockDataplane) RuleTouched ¶
func (d *MockDataplane) RuleTouched(chainName string, ruleNum int) bool
func (*MockDataplane) Sleep ¶
func (d *MockDataplane) Sleep(duration time.Duration)
Click to show internal directories.
Click to hide internal directories.