Documentation ¶
Index ¶
- type ExpectedIPSet
- type ExpectedIptablesChain
- type ExpectedIptablesRule
- type ExpectedRealServer
- type ExpectedVirtualServer
- type FakeNetlinkHandle
- func (h *FakeNetlinkHandle) DeleteDummyDevice(devName string) error
- func (h *FakeNetlinkHandle) EnsureAddressBind(address, devName string) (exist bool, err error)
- func (h *FakeNetlinkHandle) EnsureDummyDevice(devName string) (bool, error)
- func (h *FakeNetlinkHandle) GetLocalAddresses(dev, filterDev string) (sets.String, error)
- func (h *FakeNetlinkHandle) ListBindAddress(devName string) ([]string, error)
- func (h *FakeNetlinkHandle) SetLocalAddresses(dev string, ips ...string) error
- func (h *FakeNetlinkHandle) UnbindAddress(address, devName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectedIPSet ¶ added in v1.11.7
ExpectedIPSet is the expected ipset with set name and entries name
type ExpectedIptablesChain ¶ added in v1.11.7
type ExpectedIptablesChain map[string][]ExpectedIptablesRule
ExpectedIptablesChain is a map of expected iptables chain and jump rules
type ExpectedIptablesRule ¶ added in v1.11.7
ExpectedIptablesRule is the expected iptables rules with jump chain and match ipset name
type ExpectedRealServer ¶ added in v1.11.7
ExpectedRealServer is the expected ipvs RealServer
type ExpectedVirtualServer ¶ added in v1.11.7
type ExpectedVirtualServer struct { VSNum int IP string Port uint16 Protocol string RS []ExpectedRealServer }
ExpectedVirtualServer is the expected ipvs rules with VirtualServer and RealServer VSNum is the expected ipvs virtual server number IP:Port protocol is the expected ipvs vs info RS is the RealServer of this expected VirtualServer
type FakeNetlinkHandle ¶
type FakeNetlinkHandle struct {
// contains filtered or unexported fields
}
FakeNetlinkHandle mock implementation of proxy NetlinkHandle
func NewFakeNetlinkHandle ¶
func NewFakeNetlinkHandle() *FakeNetlinkHandle
NewFakeNetlinkHandle will create a new FakeNetlinkHandle
func (*FakeNetlinkHandle) DeleteDummyDevice ¶
func (h *FakeNetlinkHandle) DeleteDummyDevice(devName string) error
DeleteDummyDevice is a mock implementation
func (*FakeNetlinkHandle) EnsureAddressBind ¶
func (h *FakeNetlinkHandle) EnsureAddressBind(address, devName string) (exist bool, err error)
EnsureAddressBind is a mock implementation
func (*FakeNetlinkHandle) EnsureDummyDevice ¶
func (h *FakeNetlinkHandle) EnsureDummyDevice(devName string) (bool, error)
EnsureDummyDevice is a mock implementation
func (*FakeNetlinkHandle) GetLocalAddresses ¶ added in v1.10.6
func (h *FakeNetlinkHandle) GetLocalAddresses(dev, filterDev string) (sets.String, error)
GetLocalAddresses is a mock implementation
func (*FakeNetlinkHandle) ListBindAddress ¶ added in v1.12.6
func (h *FakeNetlinkHandle) ListBindAddress(devName string) ([]string, error)
ListBindAddress is a mock implementation
func (*FakeNetlinkHandle) SetLocalAddresses ¶ added in v1.10.6
func (h *FakeNetlinkHandle) SetLocalAddresses(dev string, ips ...string) error
SetLocalAddresses set IP addresses to the given interface device. It's not part of interface.
func (*FakeNetlinkHandle) UnbindAddress ¶
func (h *FakeNetlinkHandle) UnbindAddress(address, devName string) error
UnbindAddress is a mock implementation