Documentation ¶
Index ¶
- type FakeIPVS
- func (f *FakeIPVS) AddRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error
- func (f *FakeIPVS) AddVirtualServer(serv *utilipvs.VirtualServer) error
- func (f *FakeIPVS) ConfigureTimeouts(time.Duration, time.Duration, time.Duration) error
- func (f *FakeIPVS) DeleteRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error
- func (f *FakeIPVS) DeleteVirtualServer(serv *utilipvs.VirtualServer) error
- func (f *FakeIPVS) Flush() error
- func (f *FakeIPVS) GetRealServers(serv *utilipvs.VirtualServer) ([]*utilipvs.RealServer, error)
- func (f *FakeIPVS) GetVirtualServer(serv *utilipvs.VirtualServer) (*utilipvs.VirtualServer, error)
- func (f *FakeIPVS) GetVirtualServers() ([]*utilipvs.VirtualServer, error)
- func (f *FakeIPVS) UpdateRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error
- func (f *FakeIPVS) UpdateVirtualServer(serv *utilipvs.VirtualServer) error
- type RealServerKey
- type ServiceKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeIPVS ¶
type FakeIPVS struct { Scheduler string Services map[ServiceKey]*utilipvs.VirtualServer Destinations map[ServiceKey][]*utilipvs.RealServer }
FakeIPVS no-op implementation of ipvs Interface
func (*FakeIPVS) AddRealServer ¶
func (f *FakeIPVS) AddRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error
AddRealServer is a fake implementation, it simply creates a RealServer for a VirtualServer in the cache store.
func (*FakeIPVS) AddVirtualServer ¶
func (f *FakeIPVS) AddVirtualServer(serv *utilipvs.VirtualServer) error
AddVirtualServer is a fake implementation, it simply adds the VirtualServer into the cache store.
func (*FakeIPVS) ConfigureTimeouts ¶ added in v1.18.0
ConfigureTimeouts is not supported for fake IPVS
func (*FakeIPVS) DeleteRealServer ¶
func (f *FakeIPVS) DeleteRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error
DeleteRealServer is a fake implementation, it deletes the real server in the cache store.
func (*FakeIPVS) DeleteVirtualServer ¶
func (f *FakeIPVS) DeleteVirtualServer(serv *utilipvs.VirtualServer) error
DeleteVirtualServer is a fake implementation, it simply deletes the VirtualServer from the cache store.
func (*FakeIPVS) GetRealServers ¶
func (f *FakeIPVS) GetRealServers(serv *utilipvs.VirtualServer) ([]*utilipvs.RealServer, error)
GetRealServers is a fake implementation, it simply returns all RealServers in the cache store.
func (*FakeIPVS) GetVirtualServer ¶
func (f *FakeIPVS) GetVirtualServer(serv *utilipvs.VirtualServer) (*utilipvs.VirtualServer, error)
GetVirtualServer is a fake implementation, it tries to find a specific VirtualServer from the cache store.
func (*FakeIPVS) GetVirtualServers ¶
func (f *FakeIPVS) GetVirtualServers() ([]*utilipvs.VirtualServer, error)
GetVirtualServers is a fake implementation, it simply returns all VirtualServers in the cache store.
func (*FakeIPVS) UpdateRealServer ¶ added in v1.11.5
func (f *FakeIPVS) UpdateRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error
UpdateRealServer is a fake implementation, it deletes the old real server then add new real server
func (*FakeIPVS) UpdateVirtualServer ¶
func (f *FakeIPVS) UpdateVirtualServer(serv *utilipvs.VirtualServer) error
UpdateVirtualServer is a fake implementation, it updates the VirtualServer in the cache store.
type RealServerKey ¶ added in v1.15.0
RealServerKey uniquely identifies an Endpoint for an IPVS real server
func (*RealServerKey) String ¶ added in v1.15.0
func (r *RealServerKey) String() string
type ServiceKey ¶ added in v1.15.0
ServiceKey uniquely identifies a Service for an IPVS virtual server
func (*ServiceKey) String ¶ added in v1.15.0
func (s *ServiceKey) String() string