lsmuxsession

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSessionName = "default"

Variables

This section is empty.

Functions

func Attach

func Attach(session Session, options AttachOptions) error

func DialSession

func DialSession(session Session) (net.Conn, error)

func FormatSessionSummary

func FormatSessionSummary(session Session) string

func MarkSessionAlive

func MarkSessionAlive(session *Session)

func PingSession

func PingSession(session Session) bool

func RemoveSession

func RemoveSession(name string) error

func SaveSession

func SaveSession(session Session) error

Types

type AttachOptions

type AttachOptions struct {
	PrefixSpec string
	DetachSpec string
}

type Daemon

type Daemon struct {
	Name       string
	ConfigPath string
	SocketPath string
	Exe        string
	Args       []string
	Env        []string
	// contains filtered or unexported fields
}

func (*Daemon) Close

func (d *Daemon) Close() error

func (*Daemon) Run

func (d *Daemon) Run(ready func()) error

type Message

type Message struct {
	Type    string `json:"type"`
	Data    []byte `json:"data,omitempty"`
	Cols    int    `json:"cols,omitempty"`
	Rows    int    `json:"rows,omitempty"`
	Message string `json:"message,omitempty"`
}

type Session

type Session struct {
	Name         string    `json:"name"`
	PID          int       `json:"pid"`
	Network      string    `json:"network"`
	Address      string    `json:"address"`
	SocketPath   string    `json:"socket_path,omitempty"`
	ConfigPath   string    `json:"config_path,omitempty"`
	CreatedAt    time.Time `json:"created_at"`
	LastAttached time.Time `json:"last_attached_at"`
	Stale        bool      `json:"-"`
	AliveChecked bool      `json:"-"`
}

func ListSessions

func ListSessions() ([]Session, error)

func LoadSession

func LoadSession(name string) (Session, error)

func ResolveSession

func ResolveSession(name string) (Session, error)

Jump to

Keyboard shortcuts

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