sshexec

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sshexec implements the MCP execution ports using the shared SSH/SFTP core. It does not load inventory, secrets, trust, or defaults from CLI state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDedicatedForward

func RunDedicatedForward(ctx context.Context, client *ssh.Client, spec tunnel.Spec, ready func(string) bool, report func(error)) (retErr error)

RunDedicatedForward requires an exclusively owned SSH/ProxyJump transport. Wait interrupts that physical transport on cancellation; this must never be called with an ordinary command/transfer pool's borrowed client.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, options Options) (*Backend, error)

func (*Backend) Inspect

func (b *Backend) Inspect(ctx context.Context, permit ports.Permit, nodeID string, request ports.InspectRequest) (_ remotefile.Metadata, retErr error)

func (*Backend) OpenFiles

func (b *Backend) OpenFiles(ctx context.Context, permit ports.Permit, nodeID string) (ports.FileSession, error)

func (*Backend) OpenTransfer

func (b *Backend) OpenTransfer(ctx context.Context, permit ports.Permit, nodeID string) (ports.TransferSession, error)

func (*Backend) ProbeExecution

func (b *Backend) ProbeExecution(ctx context.Context, permit ports.Permit, nodeID string) (_ *ssh.ProbeResult, retErr error)

func (*Backend) Retire

func (b *Backend) Retire(plan ssh.ConnectionPlan) error

Retire drains a cached plan but never grants or revokes execution permission.

func (*Backend) RetirePlans

func (b *Backend) RetirePlans(ctx context.Context, plans []ssh.ConnectionPlan) error

RetirePlans is a publication callback. Old admitted operations can still finish, but late connections for their retired snapshots are not cached.

func (*Backend) Run

func (b *Backend) Run(ctx context.Context, permit ports.Permit, nodeID string, command ports.Command) (result ports.CommandResult, retErr error)

func (*Backend) RunTunnel

func (b *Backend) RunTunnel(ctx context.Context, permit ports.Permit, spec tunnel.Spec, ready func(string) bool, report func(error)) (retErr error)

func (*Backend) Shutdown

func (b *Backend) Shutdown(ctx context.Context) error

type Options

type Options struct {
	SSH               []ssh.Option
	Logger            corelog.DebugLogger
	KeepAliveInterval time.Duration
	KeepAliveTimeout  time.Duration
}

Jump to

Keyboard shortcuts

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