api

package
v22.11.9 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	String() string
	Close() fail.Error
	RunWithTimeout(ctx context.Context, outs outputs.Enum, timeout time.Duration) (int, string, string, fail.Error)
}

Command defines an SSH command

type Config

type Config interface {
	GetUser() (string, fail.Error)
	GetHostname() (string, fail.Error)
	GetLocalHost() (string, fail.Error)
	GetPort() (uint, fail.Error)
	GetLocalPort() (uint, fail.Error)
	GetIPAddress() (string, fail.Error)
	GetPrivateKey() (string, fail.Error)
	GetPrimaryGatewayConfig() (Config, fail.Error)
	GetSecondaryGatewayConfig() (Config, fail.Error)
	GetGatewayConfig(uint) (Config, fail.Error)
	HasGateways() (bool, fail.Error)
}

Config is a shared interface for both binary-based ssh and library-based ssh

type Connector

type Connector interface {
	CreatePersistentTunneling() fail.Error
	Config() (Config, fail.Error)
	CopyWithTimeout(context.Context, string, string, bool, time.Duration) (int, string, string, fail.Error)
	Enter(context.Context, string, string) fail.Error
	NewCommand(context.Context, string) (Command, fail.Error)
	NewSudoCommand(context.Context, string) (Command, fail.Error)
	WaitServerReady(context.Context, string, time.Duration) (string, fail.Error)
}

Connector describes the interface that exposes methods to interact with remote

Jump to

Keyboard shortcuts

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