Documentation
¶
Overview ¶
Package terminal routes canonical AOP PTY messages to the local PTY runtime.
Index ¶
- Constants
- func IsClosed(message *ptypb.ProtocolMessage) bool
- func IsDetach(message *ptypb.ProtocolMessage) bool
- func NewDetach(streamID string) *ptypb.ProtocolMessage
- func NewDetached(streamID string) *ptypb.ProtocolMessage
- func NewKill(streamID string) *ptypb.ProtocolMessage
- func NewList(streamID, nodeID string) *ptypb.ProtocolMessage
- func NodeID(message *ptypb.ProtocolMessage) string
- func StreamID(message *ptypb.ProtocolMessage) string
- type Option
- type Router
- type SendFunc
Constants ¶
View Source
const ( DefaultAttachBytes = 64 * 1024 DefaultMonitorInterval = 50 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
func IsClosed ¶
func IsClosed(message *ptypb.ProtocolMessage) bool
func IsDetach ¶
func IsDetach(message *ptypb.ProtocolMessage) bool
func NewDetach ¶
func NewDetach(streamID string) *ptypb.ProtocolMessage
func NewDetached ¶
func NewDetached(streamID string) *ptypb.ProtocolMessage
func NewKill ¶
func NewKill(streamID string) *ptypb.ProtocolMessage
func NewList ¶
func NewList(streamID, nodeID string) *ptypb.ProtocolMessage
func NodeID ¶
func NodeID(message *ptypb.ProtocolMessage) string
func StreamID ¶
func StreamID(message *ptypb.ProtocolMessage) string
Types ¶
type Option ¶
type Option func(*Router)
func WithAttachBytes ¶
func WithMonitorInterval ¶
func WithOpener ¶
func WithOpener(kind string, opener runtimepty.OpenFunc) Option
func WithOpeners ¶
func WithOpeners(openers map[string]runtimepty.OpenFunc) Option
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func NewRouter ¶
func NewRouter(mgr runtimepty.SessionManager, opts ...Option) *Router
func NewRuntimeRouter ¶
func NewRuntimeRouter(mgr *runtimepty.Manager, opts ...Option) *Router
NewRuntimeRouter wraps the utils/pty runtime with the canonical AOP PTY protocol. Callers above this boundary only exchange ProtocolMessage values; runtime opener and session details remain private to this package.
func (*Router) BroadcastSessions ¶
BroadcastSessions emits the current runtime session state as canonical AOP PTY messages for every active stream.
type SendFunc ¶
type SendFunc func(*ptypb.ProtocolMessage)
Click to show internal directories.
Click to hide internal directories.