tty

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Shell     string // shell to run, default "bash"
	GottyBin  string // path to gotty binary, default "gotty"
	GottyPort int    // gotty listen port, default 8081
	GottyAddr string // gotty listen addr, default "127.0.0.1"
	Prefix    string // URL prefix the handler is mounted at, e.g. "/tools/webtty/tty"
}

type Server

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

func New

func New(cfg Config) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns an http.Handler for all terminal routes. Mount it at cfg.Prefix+"/" in your router.

func (*Server) Shutdown

func (s *Server) Shutdown(_ context.Context) error

Shutdown stops gotty gracefully.

Jump to

Keyboard shortcuts

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