protocol

package
v2.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package protocol contains the interfaces for the protocol implementations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrValidationFailed is returned when a connection config fails validation.
	ErrValidationFailed = errors.New("validation failed")

	// ErrAbort is returned when retrying an operation will not result in a
	// different outcome.
	ErrAbort = errors.New("operation can not be completed")
)

Functions

This section is empty.

Types

type Connection

type Connection interface {
	fmt.Stringer
	Protocol() string
	IPAddress() string
	ProcessStarter
	WindowsChecker
}

Connection is the minimum interface for protocol implementations.

type Connector

type Connector interface {
	Connect() error
}

Connector is a connection that can be established.

type ConnectorWithContext

type ConnectorWithContext interface {
	Connect(ctx context.Context) error
}

ConnectorWithContext is a connection that can be established in a context aware fashion.

type Disconnector

type Disconnector interface {
	Disconnect()
}

Disconnector is a connection that can be closed.

type InteractiveExecer

type InteractiveExecer interface {
	ExecInteractive(cmd string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error
}

InteractiveExecer is a connection that can start an interactive session.

type ProcessStarter

type ProcessStarter interface {
	StartProcess(ctx context.Context, cmd string, stdin io.Reader, stdout io.Writer, stderr io.Writer) (Waiter, error)
}

ProcessStarter can start processes.

type Waiter

type Waiter interface {
	Wait() error
}

Waiter is a process that can be waited to finish.

type WindowsChecker

type WindowsChecker interface {
	IsWindows() bool
}

WindowsChecker is a type that can check if the underlying system is Windows.

Directories

Path Synopsis
Package localhost provides a rig protocol implementation to the local host using the os/exec package.
Package localhost provides a rig protocol implementation to the local host using the os/exec package.
Package openssh provides a rig protocol implementation that uses the system's openssh client "ssh" to connect to remote hosts.
Package openssh provides a rig protocol implementation that uses the system's openssh client "ssh" to connect to remote hosts.
ssh
Package ssh provides a rig protocol implementation for SSH connections.
Package ssh provides a rig protocol implementation for SSH connections.
agent
Package agent provides a client implementation for the SSH agent.
Package agent provides a client implementation for the SSH agent.
hostkey
Package hostkey implements a callback for the ssh.ClientConfig.HostKeyCallback
Package hostkey implements a callback for the ssh.ClientConfig.HostKeyCallback
Package winrm provides a rig protocol implementation for WinRM connections
Package winrm provides a rig protocol implementation for WinRM connections

Jump to

Keyboard shortcuts

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