exec

package
v0.1.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package exec is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackgroundRun

func BackgroundRun(cmd *exec.Cmd, name string) (err error)

BackgroundRun run cmd in background

func BackgroundRunWithCtx added in v0.1.0

func BackgroundRunWithCtx(cmdCtx *CMDContext) (err error)

BackgroundRunWithCtx run cmd in background with context

func RunAndWait

func RunAndWait(cmd *exec.Cmd, name string) (err error)

RunAndWait run cmd

Types

type CMDContext added in v0.1.0

type CMDContext struct {
	Ctx  context.Context
	Cmd  *exec.Cmd
	Name string
	Stop chan struct{} // notify parent current Cmd occur error
}

CMDContext context of cmd

type Cli added in v0.1.0

type Cli struct {
	KubeOptions []string
	TunName     string
	SourceIP    string
	DestIP      string
	// MaskLen the net mask length of tun cidr
	MaskLen string
}

Cli ...

func (*Cli) Kubectl added in v0.1.0

func (c *Cli) Kubectl() kubectl.CliInterface

Kubectl ...

func (*Cli) PortForward added in v0.1.0

func (c *Cli) PortForward() portforward.CliInterface

PortForward ...

func (*Cli) SSH added in v0.1.0

func (c *Cli) SSH() ssh.CliInterface

SSH ...

func (*Cli) SshChannel added in v0.1.0

func (c *Cli) SshChannel() sshchannel.Channel

SshChannel ...

func (*Cli) Sshuttle added in v0.1.0

func (c *Cli) Sshuttle() sshuttle.CliInterface

Sshuttle ...

func (*Cli) Tunnel added in v0.1.0

func (c *Cli) Tunnel() tunnel.CliInterface

type CliInterface added in v0.1.0

type CliInterface interface {
	Kubectl() kubectl.CliInterface
	Sshuttle() sshuttle.CliInterface
	SSH() ssh.CliInterface
	Tunnel() tunnel.CliInterface
	SshChannel() sshchannel.Channel
	PortForward() portforward.CliInterface
}

CliInterface ...

type MockCliInterface added in v0.1.0

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

MockCliInterface is a mock of CliInterface interface.

func NewMockCliInterface added in v0.1.0

func NewMockCliInterface(ctrl *gomock.Controller) *MockCliInterface

NewMockCliInterface creates a new mock instance.

func (*MockCliInterface) EXPECT added in v0.1.0

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

func (*MockCliInterface) Kubectl added in v0.1.0

func (m *MockCliInterface) Kubectl() kubectl.CliInterface

Kubectl mocks base method.

func (*MockCliInterface) PortForward added in v0.1.0

func (m *MockCliInterface) PortForward() portforward.CliInterface

PortForward mocks base method.

func (*MockCliInterface) SSH added in v0.1.0

SSH mocks base method.

func (*MockCliInterface) SshChannel added in v0.1.0

func (m *MockCliInterface) SshChannel() sshchannel.Channel

SshChannel mocks base method.

func (*MockCliInterface) Sshuttle added in v0.1.0

func (m *MockCliInterface) Sshuttle() sshuttle.CliInterface

Sshuttle mocks base method.

func (*MockCliInterface) Tunnel added in v0.1.0

func (m *MockCliInterface) Tunnel() tunnel.CliInterface

Tunnel mocks base method.

type MockCliInterfaceMockRecorder added in v0.1.0

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

MockCliInterfaceMockRecorder is the mock recorder for MockCliInterface.

func (*MockCliInterfaceMockRecorder) Kubectl added in v0.1.0

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

Kubectl indicates an expected call of Kubectl.

func (*MockCliInterfaceMockRecorder) PortForward added in v0.1.0

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

PortForward indicates an expected call of PortForward.

func (*MockCliInterfaceMockRecorder) SSH added in v0.1.0

SSH indicates an expected call of SSH.

func (*MockCliInterfaceMockRecorder) SshChannel added in v0.1.0

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

SshChannel indicates an expected call of SshChannel.

func (*MockCliInterfaceMockRecorder) Sshuttle added in v0.1.0

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

Sshuttle indicates an expected call of Sshuttle.

func (*MockCliInterfaceMockRecorder) Tunnel added in v0.1.0

Tunnel indicates an expected call of Tunnel.

Directories

Path Synopsis
Package kubectl is a generated GoMock package.
Package kubectl is a generated GoMock package.
Package portforward is a generated GoMock package.
Package portforward is a generated GoMock package.
Package ssh is a generated GoMock package.
Package ssh is a generated GoMock package.
Package sshchannel is a generated GoMock package.
Package sshchannel is a generated GoMock package.
Package sshuttle is a generated GoMock package.
Package sshuttle is a generated GoMock package.
Package tunnel is a generated GoMock package.
Package tunnel is a generated GoMock package.

Jump to

Keyboard shortcuts

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