ssh

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SSHRetryDelay is the time to wait for an SSH connection to be established
	// to a single endpoint of a target.
	SSHRetryDelay = 500 * time.Millisecond

	// SSHTimeout is the time to wait for before giving up trying to establish
	// an SSH connection to a target, after retrying.
	SSHTimeout = 5 * time.Second

	// SSHPort is the TCP port used for SSH connections.
	SSHPort = 22
)

Variables

This section is empty.

Functions

func NewDebugCodeCommand

func NewDebugCodeCommand(hostChecker ssh.ReachableChecker) cmd.Command

NewDebugCodeCommand creates a juju debug-code command.

func NewDebugHooksCommand

func NewDebugHooksCommand(hostChecker ssh.ReachableChecker) cmd.Command

NewDebugHooksCommand creates a juju debug-hooks command.

func NewSCPCommand

func NewSCPCommand(hostChecker jujussh.ReachableChecker) cmd.Command

NewSCPCommand creates a juju scp command.

func NewSSHCommand

func NewSSHCommand(
	hostChecker jujussh.ReachableChecker,
	isTerminal func(interface{}) bool,
) cmd.Command

NewSSHCommand creates a juju ssh command.

Types

type ApplicationAPI

type ApplicationAPI interface {
	Close() error
	UnitsInfo(units []names.UnitTag) ([]application.UnitInfo, error)
}

ApplicationAPI defines application related APIs.

type CharmsAPI

type CharmsAPI interface {
	Close() error
	CharmInfo(charmURL string) (*commoncharm.CharmInfo, error)
}

type CloudCredentialAPI

type CloudCredentialAPI interface {
	Cloud(tag names.CloudTag) (jujucloud.Cloud, error)
	CredentialContents(cloud, credential string, withSecrets bool) ([]params.CredentialContentResult, error)
	BestAPIVersion() int
	Close() error
}

CloudCredentialAPI defines cloud credential related APIs.

type Context

type Context interface {
	InterruptNotify(c chan<- os.Signal)
	StopInterruptNotify(c chan<- os.Signal)
	GetStdout() io.Writer
	GetStderr() io.Writer
	GetStdin() io.Reader
}

Context defines methods for command context.

type ModelAPI

type ModelAPI interface {
	Close() error
	ModelInfo([]names.ModelTag) ([]params.ModelInfoResult, error)
}

ModelAPI defines model related APIs.

type ModelCommand

type ModelCommand interface {
	NewControllerAPIRoot() (api.Connection, error)
	ModelDetails() (string, *jujuclient.ModelDetails, error)
	NewAPIRoot() (api.Connection, error)
	NewAPIClient() (*api.Client, error)
	ModelIdentifier() (string, error)
}

ModelCommand defines methods of the model command.

type StatusAPI

type StatusAPI interface {
	Status([]string) (*params.FullStatus, error)
	Close() error
}

StatusAPI is implemented by types that can query the full status of a model.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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