ssh

package
v0.0.0-...-fd46d7f Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// ExecuteNodeCommands executes a command on a node.
	ExecuteNodeCommands(ctx context.Context, nodeName string, commands []string) error

	// NodeUpload uploads a file to a node.
	NodeUpload(ctx context.Context, nodeName string,
		remoteFileDir string, fileUploadRequest *rest.FileUploadRequest) error
}

Client is an interface for performing SSH requests against the Proxmox Nodes.

func NewClient

func NewClient(
	username string, password string,
	agent bool, agentSocket string,
	nodeLookup NodeResolver,
) (Client, error)

NewClient creates a new SSH client.

type NodeResolver

type NodeResolver interface {
	Resolve(ctx context.Context, nodeName string) (string, error)
}

NodeResolver is an interface for resolving node names to IP addresses to use for SSH connection.

Jump to

Keyboard shortcuts

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