kubernetes/pkg/proxy/ipvs/util/testing/fake.go

type FakeIPVS

type ServiceKey

func (s *ServiceKey) String() string {}

type RealServerKey

func (r *RealServerKey) String() string {}

type byAddress

func (a byAddress) Len() int {}

func (a byAddress) Less(i, j int) bool {}

func (a byAddress) Swap(i, j int) {}

// NewFake creates a fake ipvs implementation - a cache store.
func NewFake() *FakeIPVS {}

func toServiceKey(serv *utilipvs.VirtualServer) ServiceKey {}

func toRealServerKey(rs *utilipvs.RealServer) *RealServerKey {}

// AddVirtualServer is a fake implementation, it simply adds the VirtualServer into the cache store.
func (f *FakeIPVS) AddVirtualServer(serv *utilipvs.VirtualServer) error {}

// UpdateVirtualServer is a fake implementation, it updates the VirtualServer in the cache store.
func (f *FakeIPVS) UpdateVirtualServer(serv *utilipvs.VirtualServer) error {}

// DeleteVirtualServer is a fake implementation, it simply deletes the VirtualServer from the cache store.
func (f *FakeIPVS) DeleteVirtualServer(serv *utilipvs.VirtualServer) error {}

// GetVirtualServer is a fake implementation, it tries to find a specific VirtualServer from the cache store.
func (f *FakeIPVS) GetVirtualServer(serv *utilipvs.VirtualServer) (*utilipvs.VirtualServer, error) {}

// GetVirtualServers is a fake implementation, it simply returns all VirtualServers in the cache store.
func (f *FakeIPVS) GetVirtualServers() ([]*utilipvs.VirtualServer, error) {}

// Flush is a fake implementation, it simply clears the cache store.
func (f *FakeIPVS) Flush() error {}

// AddRealServer is a fake implementation, it simply creates a RealServer for a VirtualServer in the cache store.
func (f *FakeIPVS) AddRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error {}

// GetRealServers is a fake implementation, it simply returns all RealServers in the cache store.
func (f *FakeIPVS) GetRealServers(serv *utilipvs.VirtualServer) ([]*utilipvs.RealServer, error) {}

// DeleteRealServer is a fake implementation, it deletes the real server in the cache store.
func (f *FakeIPVS) DeleteRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error {}

// UpdateRealServer is a fake implementation, it deletes the old real server then add new real server
func (f *FakeIPVS) UpdateRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error {}

// ConfigureTimeouts is not supported for fake IPVS
func (f *FakeIPVS) ConfigureTimeouts(time.Duration, time.Duration, time.Duration) error {}

var _