kubernetes: k8s.io/kubernetes/pkg/util/iptables/testing Index | Files

package testing

import "k8s.io/kubernetes/pkg/util/iptables/testing"


Package Files



const (
    Destination = "-d "
    Source      = "-s "
    DPort       = "--dport "
    Protocol    = "-p "
    Jump        = "-j "
    Reject      = "REJECT"
    ToDest      = "--to-destination "
    Recent      = "recent "
    MatchSet    = "--match-set "
    SrcType     = "--src-type "
    Masquerade  = "MASQUERADE "

type FakeIPTables Uses

type FakeIPTables struct {
    Lines []byte
    // contains filtered or unexported fields

no-op implementation of iptables Interface

func NewFake Uses

func NewFake() *FakeIPTables

func (*FakeIPTables) DeleteChain Uses

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

func (*FakeIPTables) DeleteRule Uses

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

func (*FakeIPTables) EnsureChain Uses

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

func (*FakeIPTables) EnsureRule Uses

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

func (*FakeIPTables) FlushChain Uses

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

func (*FakeIPTables) GetRules Uses

func (f *FakeIPTables) GetRules(chainName string) (rules []Rule)

GetChain returns a list of rules for the given chain. The chain name must match exactly. The matching is pretty dumb, don't rely on it for anything but testing.

func (*FakeIPTables) HasRandomFully Uses

func (f *FakeIPTables) HasRandomFully() bool

func (*FakeIPTables) IsIpv6 Uses

func (*FakeIPTables) IsIpv6() bool

func (*FakeIPTables) Monitor Uses

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

func (*FakeIPTables) Restore Uses

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

func (*FakeIPTables) RestoreAll Uses

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

func (*FakeIPTables) Save Uses

func (f *FakeIPTables) Save(table iptables.Table) ([]byte, error)

func (*FakeIPTables) SaveInto Uses

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

func (*FakeIPTables) SetHasRandomFully Uses

func (f *FakeIPTables) SetHasRandomFully(can bool) *FakeIPTables

type Rule Uses

type Rule map[string]string

Package testing imports 5 packages (graph) and is imported by 25 packages. Updated 2019-09-20. Refresh now. Tools for package owners.