ptyapi

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 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 ptyapi 是 d_sessions(终端 PTY 域)的入站薄门面(B156.3 §7.0): attach 入口所需的会话存在性与快照信息。打开/写入/订阅终端仍走既有 gateway 直连通道,本包不重复其语义。

命名警示(spec §7.0):d_sessions 是终端 PTY 域;B156.2 的会话子系统是协作 房间域;keystone 管的是协调者会话的拉起与唤醒。三者同名不同物。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Host

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

Host 包装既有 *ptyhost.Host,收窄成薄门面。

func New

func New(h *ptyhost.Host) *Host

New 包装一个已构造的 PTY 宿主。

func (*Host) Has

func (p *Host) Has(id string) bool

Has 报告会话是否存活可附着(直通镜像:ptyhost.Host.Get 的存在性半边)。

func (*Host) Snapshot

func (p *Host) Snapshot(id string) (SessionInfo, bool)

Snapshot 读会话快照(直通镜像:ptyhost.Host.Get)。不存在返回 ok=false。

type SessionInfo

type SessionInfo struct {
	ID  string `json:"id"`
	Dir string `json:"dir,omitempty"`
}

SessionInfo 是 attach 定位需要的会话快照。Dir 是会话的基准目录 (ptyhost.Session.BasePath 的门面投影)。

Jump to

Keyboard shortcuts

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