Versions in this module Expand all Collapse all v0 v0.9.1 Feb 5, 2021 Changes in this version + const ExcludeProcessKey + const ProcessKey + type LocalChannel struct + func (l *LocalChannel) GetPidUser(pid string) (string, error) + func (l *LocalChannel) GetPidsByLocalPort(localPort string) ([]string, error) + func (l *LocalChannel) GetPidsByLocalPorts(localPorts []string) ([]string, error) + func (l *LocalChannel) GetPidsByProcessCmdName(processName string, ctx context.Context) ([]string, error) + func (l *LocalChannel) GetPidsByProcessName(processName string, ctx context.Context) ([]string, error) + func (l *LocalChannel) GetPsArgs() string + func (l *LocalChannel) GetScriptPath() string + func (l *LocalChannel) IsCommandAvailable(commandName string) bool + func (l *LocalChannel) ProcessExists(pid string) (bool, error) + func (l *LocalChannel) Run(ctx context.Context, script, args string) *spec.Response + type MockLocalChannel struct + GetPidUserFunc func(pid string) (string, error) + GetPidsByLocalPortFunc func(localPort string) ([]string, error) + GetPidsByLocalPortsFunc func(localPorts []string) ([]string, error) + GetPidsByProcessCmdNameFunc func(processName string, ctx context.Context) ([]string, error) + GetPidsByProcessNameFunc func(processName string, ctx context.Context) ([]string, error) + GetPsArgsFunc func() string + IsCommandAvailableFunc func(commandName string) bool + ProcessExistsFunc func(pid string) (bool, error) + RunFunc func(ctx context.Context, script, args string) *spec.Response + ScriptPath string + func (mlc *MockLocalChannel) GetPidUser(pid string) (string, error) + func (mlc *MockLocalChannel) GetPidsByLocalPort(localPort string) ([]string, error) + func (mlc *MockLocalChannel) GetPidsByLocalPorts(localPorts []string) ([]string, error) + func (mlc *MockLocalChannel) GetPidsByProcessCmdName(processName string, ctx context.Context) ([]string, error) + func (mlc *MockLocalChannel) GetPidsByProcessName(processName string, ctx context.Context) ([]string, error) + func (mlc *MockLocalChannel) GetPsArgs() string + func (mlc *MockLocalChannel) GetScriptPath() string + func (mlc *MockLocalChannel) IsCommandAvailable(commandName string) bool + func (mlc *MockLocalChannel) ProcessExists(pid string) (bool, error) + func (mlc *MockLocalChannel) Run(ctx context.Context, script, args string) *spec.Response + type OsChannel interface + GetPidUser func(pid string) (string, error) + GetPidsByLocalPort func(localPort string) ([]string, error) + GetPidsByLocalPorts func(localPorts []string) ([]string, error) + GetPidsByProcessCmdName func(processName string, ctx context.Context) ([]string, error) + GetPidsByProcessName func(processName string, ctx context.Context) ([]string, error) + GetPsArgs func() string + IsCommandAvailable func(commandName string) bool + ProcessExists func(pid string) (bool, error) + func NewLocalChannel() OsChannel + func NewMockLocalChannel() OsChannel v0.9.1-1 Feb 5, 2021