Documentation ¶
Index ¶
- Constants
- func NewIptables(exec utilexec.Interface) iptablesInterface
- type FakeIPTables
- type Iptables
- type Proxier
- func (p *Proxier) RegisterInformers()
- func (p *Proxier) StartEndpointInformer(stopCh <-chan struct{}) error
- func (p *Proxier) StartInformerFactory(stopCh <-chan struct{}) error
- func (p *Proxier) StartNamespaceInformer(stopCh <-chan struct{}) error
- func (p *Proxier) StartServiceInformer(stopCh <-chan struct{}) error
- func (p *Proxier) SyncLoop() error
- type Rule
Constants ¶
const ( TableNAT = "nat" ChainPrerouting = "PREROUTING" ChainSKPrerouting = "STACKUBE-PREROUTING" )
const ( Destination = "-d " Source = "-s " DPort = "--dport " Protocol = "-p " Jump = "-j " ToDest = "--to-destination " )
Variables ¶
This section is empty.
Functions ¶
func NewIptables ¶
Types ¶
type FakeIPTables ¶
type FakeIPTables struct { sync.Mutex NSLines map[string][]byte // contains filtered or unexported fields }
FakeIPTables have noop implementation of fake iptables function.
func (*FakeIPTables) GetRules ¶
func (f *FakeIPTables) GetRules(chainName, namespace string) (rules []Rule)
GetRules 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.
type Proxier ¶
type Proxier struct {
// contains filtered or unexported fields
}
Proxier is an iptables based proxy for connections between a localhost:port and services that provide the actual backends in each network.
func NewProxier ¶
NewProxier creates a new Proxier.
func (*Proxier) RegisterInformers ¶
func (p *Proxier) RegisterInformers()
RegisterInformers registers informers which informer on namespaces,services and endpoints change.
func (*Proxier) StartEndpointInformer ¶
StartEndpointInformer starts endpoint informer.
func (*Proxier) StartInformerFactory ¶
StartInformerFactory starts informer factory.
func (*Proxier) StartNamespaceInformer ¶
StartNamespaceInformer starts namespace informer.
func (*Proxier) StartServiceInformer ¶
StartServiceInformer starts service informer.