Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRunner ¶
type AgentRunner struct {
Provider SessionProvider
Transferer *agenttransfer.Transferer
Recorder *agentproto.Recorder // nil disables recording
AgentConfig *agentproto.AgentConfig // sent to agent before exec; nil skips
Log *slog.Logger
}
AgentRunner executes remote commands by launching the mproxy-agent binary on the remote host and communicating over CBOR mux.
func (*AgentRunner) RunWithControl ¶
RunWithControl extends Run with signal forwarding and extra fd bridging.
type Control ¶
type Control struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Signals <-chan int
ExtraFDs map[uint32]io.ReadWriteCloser
}
Control provides additional channels for signal delivery and extra file descriptor bridging beyond basic stdin/stdout/stderr.
type Runner ¶
type Runner interface {
Run(ctx context.Context, req Request, stdin io.Reader, stdout io.Writer, stderr io.Writer) (int, error)
}
Runner executes a request and writes command output to stdout/stderr. It returns the process exit code and an error if the request could not be started.
type RunnerFunc ¶
type SSHRunner ¶
type SSHRunner struct {
Provider SessionProvider
}
type SessionProvider ¶
SessionProvider creates SSH sessions. Typically satisfied by *sshconn.Manager.
Click to show internal directories.
Click to hide internal directories.