tun

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2021 License: MIT Imports: 5 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() error

AddDevice add a tun device on machine

func (*Cli) AddRoute

func (s *Cli) AddRoute(cidr string) error

AddRoute add route to kubernetes network.

func (*Cli) RemoveDevice

func (s *Cli) RemoveDevice() error

func (*Cli) SetDeviceIP

func (s *Cli) SetDeviceIP() error

SetDeviceIP set the ip of tun device

type CliInterface

type CliInterface interface {
	AddDevice() error
	AddRoute(cidr string) error
	SetDeviceIP() error
	RemoveDevice() error
}

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() error

AddDevice mocks base method.

func (*MockCliInterface) AddRoute

func (m *MockCliInterface) AddRoute(cidr string) error

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() error

RemoveDevice mocks base method.

func (*MockCliInterface) SetDeviceIP

func (m *MockCliInterface) SetDeviceIP() error

SetDeviceIP 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.

Jump to

Keyboard shortcuts

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