testing

package
v0.0.0-alpha.0....-0717dc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeFakeIPTables

type NodeFakeIPTables struct {
	// contains filtered or unexported fields
}

NodeFakeIPTables is no-op implementation of iptables Interface.

func (*NodeFakeIPTables) ChainExists

func (f *NodeFakeIPTables) ChainExists(table iptables.Table, chain iptables.Chain) (bool, error)

ChainExists is part of iptables.Interface

func (*NodeFakeIPTables) DeleteChain

func (f *NodeFakeIPTables) DeleteChain(table iptables.Table, chain iptables.Chain) error

DeleteChain is part of iptables.Interface

func (*NodeFakeIPTables) DeleteRule

func (f *NodeFakeIPTables) DeleteRule(table iptables.Table, chain iptables.Chain, args ...string) error

DeleteRule is part of iptables.Interface

func (*NodeFakeIPTables) EnsureChain

func (f *NodeFakeIPTables) EnsureChain(table iptables.Table, chain iptables.Chain) (bool, error)

EnsureChain is part of iptables.Interface

func (*NodeFakeIPTables) EnsureRule

func (f *NodeFakeIPTables) EnsureRule(position iptables.RulePosition, table iptables.Table, chain iptables.Chain, args ...string) (bool, error)

EnsureRule is part of iptables.Interface

func (*NodeFakeIPTables) FlushChain

func (f *NodeFakeIPTables) FlushChain(table iptables.Table, chain iptables.Chain) error

FlushChain is part of iptables.Interface

func (*NodeFakeIPTables) HasRandomFully

func (f *NodeFakeIPTables) HasRandomFully() bool

HasRandomFully is part of iptables.Interface

func (*NodeFakeIPTables) IsIPv6

func (f *NodeFakeIPTables) IsIPv6() bool

IsIPv6 is part of iptables.Interface

func (*NodeFakeIPTables) IsPresent

func (f *NodeFakeIPTables) IsPresent(position iptables.RulePosition, table iptables.Table, chain iptables.Chain, args ...string) bool

IsPresent is part of NodeFakeIPTablesInterface

func (*NodeFakeIPTables) Monitor

func (f *NodeFakeIPTables) Monitor(canary iptables.Chain, tables []iptables.Table, reloadFunc func(), interval time.Duration, stopCh <-chan struct{})

Monitor is part of iptables.Interface

func (*NodeFakeIPTables) Present

func (f *NodeFakeIPTables) Present() bool

func (*NodeFakeIPTables) Protocol

func (f *NodeFakeIPTables) Protocol() iptables.Protocol

Protocol is part of iptables.Interface

func (*NodeFakeIPTables) Restore

func (*NodeFakeIPTables) Restore(table iptables.Table, data []byte, flush iptables.FlushFlag, counters iptables.RestoreCountersFlag) error

Restore is part of iptables.Interface

func (*NodeFakeIPTables) RestoreAll

func (f *NodeFakeIPTables) RestoreAll(data []byte, flush iptables.FlushFlag, counters iptables.RestoreCountersFlag) error

RestoreAll is part of iptables.Interface

func (*NodeFakeIPTables) SaveInto

func (f *NodeFakeIPTables) SaveInto(table iptables.Table, buffer *bytes.Buffer) error

SaveInto is part of iptables.Interface

type NodeFakeIPTablesInterface

type NodeFakeIPTablesInterface interface {
	iptables.Interface
	// IsPresent checks if the given rule is present in the iptables or not. If the rule existed, return true.
	IsPresent(position iptables.RulePosition, table iptables.Table, chain iptables.Chain, args ...string) bool
}

NodeFakeIPTablesInterface extends iptables.Interface

func NewFake

func NewFake() NodeFakeIPTablesInterface

NewFake returns a no-op iptables.Interface

func NewIPv6Fake

func NewIPv6Fake() NodeFakeIPTablesInterface

NewIPv6Fake returns a no-op iptables.Interface with IsIPv6() == true

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL