tunnel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tunnel is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	TunName  string
	SourceIP string
	DestIP   string
	MaskLen  string
}

Cli ...

func (*Cli) AddDevice

func (s *Cli) AddDevice() *exec.Cmd

AddDevice add a tun device on machine

func (*Cli) AddRoute

func (s *Cli) AddRoute(cidr string) *exec.Cmd

AddRoute add route to kubernetes network.

func (*Cli) RemoveDevice

func (s *Cli) RemoveDevice() *exec.Cmd

func (*Cli) SetDeviceIP

func (s *Cli) SetDeviceIP() *exec.Cmd

SetDeviceIP set the ip of tun device

func (*Cli) SetDeviceUp

func (s *Cli) SetDeviceUp() *exec.Cmd

type CliInterface

type CliInterface interface {
	AddRoute(cidr string) *exec.Cmd
	AddDevice() *exec.Cmd
	RemoveDevice() *exec.Cmd
	SetDeviceIP() *exec.Cmd
	SetDeviceUp() *exec.Cmd
}

CliInterface ...

type MockCliInterface

type MockCliInterface struct {
	// contains filtered or unexported fields
}

MockCliInterface is a mock of CliInterface interface.

func NewMockCliInterface

func NewMockCliInterface(ctrl *gomock.Controller) *MockCliInterface

NewMockCliInterface creates a new mock instance.

func (*MockCliInterface) AddDevice

func (m *MockCliInterface) AddDevice() *exec.Cmd

AddDevice mocks base method.

func (*MockCliInterface) AddRoute

func (m *MockCliInterface) AddRoute(cidr string) *exec.Cmd

AddRoute mocks base method.

func (*MockCliInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCliInterface) RemoveDevice

func (m *MockCliInterface) RemoveDevice() *exec.Cmd

RemoveDevice mocks base method.

func (*MockCliInterface) SetDeviceIP

func (m *MockCliInterface) SetDeviceIP() *exec.Cmd

SetDeviceIP mocks base method.

func (*MockCliInterface) SetDeviceUp

func (m *MockCliInterface) SetDeviceUp() *exec.Cmd

SetDeviceUp mocks base method.

type MockCliInterfaceMockRecorder

type MockCliInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockCliInterfaceMockRecorder is the mock recorder for MockCliInterface.

func (*MockCliInterfaceMockRecorder) AddDevice

func (mr *MockCliInterfaceMockRecorder) AddDevice() *gomock.Call

AddDevice indicates an expected call of AddDevice.

func (*MockCliInterfaceMockRecorder) AddRoute

func (mr *MockCliInterfaceMockRecorder) AddRoute(cidr interface{}) *gomock.Call

AddRoute indicates an expected call of AddRoute.

func (*MockCliInterfaceMockRecorder) RemoveDevice

func (mr *MockCliInterfaceMockRecorder) RemoveDevice() *gomock.Call

RemoveDevice indicates an expected call of RemoveDevice.

func (*MockCliInterfaceMockRecorder) SetDeviceIP

func (mr *MockCliInterfaceMockRecorder) SetDeviceIP() *gomock.Call

SetDeviceIP indicates an expected call of SetDeviceIP.

func (*MockCliInterfaceMockRecorder) SetDeviceUp

func (mr *MockCliInterfaceMockRecorder) SetDeviceUp() *gomock.Call

SetDeviceUp indicates an expected call of SetDeviceUp.

Jump to

Keyboard shortcuts

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