Documentation
¶
Index ¶
- Constants
- type Attach
- type ClientsChanged
- type Conn
- type DaemonStatus
- type Decoder
- func (d *Decoder) ReadBool() (bool, error)
- func (d *Decoder) ReadBytes() ([]byte, error)
- func (d *Decoder) ReadI32() (int32, error)
- func (d *Decoder) ReadString() (string, error)
- func (d *Decoder) ReadU8() (uint8, error)
- func (d *Decoder) ReadU16() (uint16, error)
- func (d *Decoder) ReadU32() (uint32, error)
- func (d *Decoder) ReadU64() (uint64, error)
- type Detach
- type Dump
- type DumpResponse
- type Encoder
- func (e *Encoder) WriteBool(v bool) error
- func (e *Encoder) WriteBytes(v []byte) error
- func (e *Encoder) WriteI32(v int32) error
- func (e *Encoder) WriteString(v string) error
- func (e *Encoder) WriteU8(v uint8) error
- func (e *Encoder) WriteU16(v uint16) error
- func (e *Encoder) WriteU32(v uint32) error
- func (e *Encoder) WriteU64(v uint64) error
- type Error
- type Exited
- type Input
- type Kill
- type List
- type Message
- type OK
- type Output
- type Prune
- type PruneResponse
- type Resize
- type Send
- type SendKey
- type Session
- type SessionStatus
- type Sessions
- type State
- type Status
- type StatusResponse
Constants ¶
View Source
const ( DumpPlain uint8 = 0 // Plain text, no escape sequences. DumpVT uint8 = 1 // VT with colors (safe for display). DumpHTML uint8 = 2 // HTML (reserved). DumpFlagUnwrap uint8 = 0x10 // Bit 4: join soft-wrapped lines. DumpFlagScrollback uint8 = 0x20 // Bit 5: include scrollback history. DumpFormatMask uint8 = 0x0F // Bits 0-3: format selector. )
View Source
const ( // Client → Daemon TypeAttach uint8 = 0x01 TypeInput uint8 = 0x02 TypeResize uint8 = 0x03 TypeDetach uint8 = 0x04 TypeList uint8 = 0x05 TypeKill uint8 = 0x06 TypeSend uint8 = 0x07 TypeDump uint8 = 0x08 TypePrune uint8 = 0x09 TypeSendKey uint8 = 0x0A TypeStatus uint8 = 0x0C // Daemon → Client TypeOK uint8 = 0x80 TypeError uint8 = 0x81 TypeOutput uint8 = 0x82 TypeState uint8 = 0x83 TypeSessions uint8 = 0x84 TypeExited uint8 = 0x85 TypeDumpResponse uint8 = 0x86 TypePruneResponse uint8 = 0x87 TypeClientsChanged uint8 = 0x88 TypeStatusResponse uint8 = 0x89 )
View Source
const (
ProtocolVersion uint8 = 6
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attach ¶
type ClientsChanged ¶
func (*ClientsChanged) Type ¶
func (m *ClientsChanged) Type() uint8
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func NewConn ¶
func NewConn(rw io.ReadWriter) *Conn
func (*Conn) AcceptHandshake ¶
Caller must check the version and call AcceptVersion or close.
func (*Conn) ReadMessage ¶
func (*Conn) WriteMessage ¶
Frame: [u32 length][u8 type][payload...]
type DaemonStatus ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) ReadString ¶
type Detach ¶
type Detach struct {
Name string // Empty = detach self, non-empty = detach named session.
}
type DumpResponse ¶
type DumpResponse struct {
Data []byte
}
func (*DumpResponse) Type ¶
func (m *DumpResponse) Type() uint8
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) WriteBytes ¶
func (*Encoder) WriteString ¶
type PruneResponse ¶
type PruneResponse struct {
Count uint32
}
func (*PruneResponse) Type ¶
func (m *PruneResponse) Type() uint8
type SessionStatus ¶
type StatusResponse ¶
type StatusResponse struct {
Daemon DaemonStatus
Session *SessionStatus
}
func (*StatusResponse) Type ¶
func (m *StatusResponse) Type() uint8
Click to show internal directories.
Click to hide internal directories.