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

package testing

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

Index

Package Files

fake.go

type FakeIPVS Uses

type FakeIPVS struct {
    Scheduler    string
    Services     map[ServiceKey]*utilipvs.VirtualServer
    Destinations map[ServiceKey][]*utilipvs.RealServer
}

FakeIPVS no-op implementation of ipvs Interface

func NewFake Uses

func NewFake() *FakeIPVS

NewFake creates a fake ipvs implementation - a cache store.

func (*FakeIPVS) AddRealServer Uses

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 Uses

func (f *FakeIPVS) AddVirtualServer(serv *utilipvs.VirtualServer) error

AddVirtualServer is a fake implementation, it simply adds the VirtualServer into the cache store.

func (*FakeIPVS) DeleteRealServer Uses

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 Uses

func (f *FakeIPVS) DeleteVirtualServer(serv *utilipvs.VirtualServer) error

DeleteVirtualServer is a fake implementation, it simply deletes the VirtualServer from the cache store.

func (*FakeIPVS) Flush Uses

func (f *FakeIPVS) Flush() error

Flush is a fake implementation, it simply clears the cache store.

func (*FakeIPVS) GetRealServers Uses

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 Uses

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 Uses

func (f *FakeIPVS) GetVirtualServers() ([]*utilipvs.VirtualServer, error)

GetVirtualServers is a fake implementation, it simply returns all VirtualServers in the cache store.

func (*FakeIPVS) UpdateRealServer Uses

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 Uses

func (f *FakeIPVS) UpdateVirtualServer(serv *utilipvs.VirtualServer) error

UpdateVirtualServer is a fake implementation, it updates the VirtualServer in the cache store.

type RealServerKey Uses

type RealServerKey struct {
    Address net.IP
    Port    uint16
}

RealServerKey uniquely identifies an Endpoint for an IPVS real server

func (*RealServerKey) String Uses

func (r *RealServerKey) String() string

type ServiceKey Uses

type ServiceKey struct {
    IP       string
    Port     uint16
    Protocol string
}

ServiceKey uniquely identifies a Service for an IPVS virtual server

func (*ServiceKey) String Uses

func (s *ServiceKey) String() string

Package testing imports 4 packages (graph). Updated 2019-05-31. Refresh now. Tools for package owners.