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

package testing

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

Index

Package Files

fake.go

Constants

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

type FakeIPTables Uses

type FakeIPTables struct {
    Lines []byte
}

no-op implementation of iptables Interface

func NewFake Uses

func NewFake() *FakeIPTables

func (*FakeIPTables) AddReloadFunc Uses

func (*FakeIPTables) AddReloadFunc(reloadFunc func())

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) Destroy Uses

func (*FakeIPTables) Destroy()

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) GetVersion Uses

func (*FakeIPTables) GetVersion() (string, error)

func (*FakeIPTables) IsIpv6 Uses

func (*FakeIPTables) IsIpv6() bool

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

type Rule Uses

type Rule map[string]string

Package testing imports 4 packages (graph) and is imported by 25 packages. Updated 2019-06-07. Refresh now. Tools for package owners.