Help us shape the future of Go! Take the 2026 Go Developer Survey

serverattach

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package serverattach opens the tmux session of a session on a server in a terminal on this machine, over `ssh -t <host> -- tmux attach-session`. The daemon does not carry terminal traffic, so ssh does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command(h server.Host, tmuxSession string) []string

Command is the argv that attaches a terminal to tmuxSession on h.

func OpenWindow

func OpenWindow(ctx context.Context, h server.Host, tmuxSession, windowName string) error

OpenWindow opens the attach in a new window of the tmux this process runs in, so the caller keeps its own window. The window stays open after a failed ssh, so the user can read why.

func Run

func Run(ctx context.Context, h server.Host, tmuxSession string) error

Run attaches this process's terminal and returns when the user detaches. A failed connection reports ssh's last stderr line, which names the cause. An error from tmux on the server reaches the user over the terminal instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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