testing

package
v1.8.15-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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 NewFake

func NewFake() *FakeIPVS

NewFake creates a fake ipvs strucuter

func (*FakeIPVS) AddRealServer

func (f *FakeIPVS) AddRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error

AddRealServer is a fake implementation

func (*FakeIPVS) AddVirtualServer

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

AddVirtualServer is a fake implementation

func (*FakeIPVS) DeleteRealServer

func (*FakeIPVS) DeleteRealServer(serv *utilipvs.VirtualServer, dest *utilipvs.RealServer) error

DeleteRealServer is a fake implementation

func (*FakeIPVS) DeleteVirtualServer

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

DeleteVirtualServer is a fake implementation

func (*FakeIPVS) EnsureVirtualServerAddressBind

func (*FakeIPVS) EnsureVirtualServerAddressBind(serv *utilipvs.VirtualServer, dev string) (exist bool, err error)

EnsureVirtualServerAddressBind is a fake implementation

func (*FakeIPVS) Flush

func (f *FakeIPVS) Flush() error

Flush is a fake implementation

func (*FakeIPVS) GetRealServers

func (f *FakeIPVS) GetRealServers(serv *utilipvs.VirtualServer) ([]*utilipvs.RealServer, error)

GetRealServers is a fake implementation

func (*FakeIPVS) GetVirtualServer

func (f *FakeIPVS) GetVirtualServer(serv *utilipvs.VirtualServer) (*utilipvs.VirtualServer, error)

GetVirtualServer is a fake implementation

func (*FakeIPVS) GetVirtualServers

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

GetVirtualServers is a fake implementation

func (*FakeIPVS) UnbindVirtualServerAddress

func (*FakeIPVS) UnbindVirtualServerAddress(serv *utilipvs.VirtualServer, dev string) error

UnbindVirtualServerAddress is a fake implementation

func (*FakeIPVS) UpdateVirtualServer

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

UpdateVirtualServer is a fake implementation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL