remote

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package remote provides an SSH-based executor for running commands on remote macOS hosts. It shells out to the system ssh binary to leverage the user's existing SSH config and agent.

Index

Constants

View Source
const DefaultMaxRetries = 3

DefaultMaxRetries is the default number of retries for transient SSH failures.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	Host       string
	User       string
	Port       string
	KeyPath    string
	MaxRetries int
}

Runner executes commands on a remote host via SSH.

func NewRunner

func NewRunner(host string) *Runner

NewRunner creates a new remote command runner for the given SSH host.

func NewRunnerWithOpts

func NewRunnerWithOpts(host, user, port, keyPath string) *Runner

NewRunnerWithOpts creates a runner with custom SSH options.

func (*Runner) LimaShell

func (r *Runner) LimaShell(ctx context.Context, vmName, command string) (string, error)

LimaShell executes a command inside a Lima VM on the remote host.

func (*Runner) LimaShellSudo

func (r *Runner) LimaShellSudo(ctx context.Context, vmName, command string) (string, error)

LimaShellSudo executes a command as root inside a Lima VM on the remote host.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, command string) (string, error)

Run executes a command on the remote host and returns the combined output. It retries on transient failures with exponential backoff.

func (*Runner) RunShell

func (r *Runner) RunShell(ctx context.Context, script string) (string, error)

RunShell executes a command via sh -c on the remote host.

Jump to

Keyboard shortcuts

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