Documentation
¶
Index ¶
- Constants
- func DecodePayload(m Envelope, target any) error
- func EncodeControl(msgType string, payload any) ([]byte, error)
- type AttachMsg
- type ConfirmMsg
- type ConfirmResponseMsg
- type CreateMsg
- type DeleteMsg
- type DetachedMsg
- type Envelope
- type ErrorMsg
- type Frame
- type FrameReader
- type FrameWriter
- type HandshakeErrMsg
- type HandshakeMsg
- type HandshakeOkMsg
- type LogsMsg
- type MsgAckMsg
- type MsgPubMsg
- type MsgSubMsg
- type MsgTopicsMsg
- type RenameMsg
- type ResizeMsg
- type ResumeMsg
- type ScreenPreviewMsg
- type ScreenPreviewResponseMsg
- type ScreenSnapshotMsg
- type ScreenSnapshotResponseMsg
- type ScrollbackMsg
- type SearchMsg
- type SessionInfo
- type SessionListMsg
- type SessionUpdateMsg
- type StopMsg
- type TypeMsg
Constants ¶
View Source
const ( ChannelControl = byte(0x00) ChannelData = byte(0x01) MaxPayload = 4 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func DecodePayload ¶
Types ¶
type ConfirmMsg ¶
type ConfirmResponseMsg ¶
type DetachedMsg ¶
type DetachedMsg struct {
Reason string `json:"reason"`
}
type Envelope ¶
type Envelope struct {
Type string `json:"type"`
Payload json.RawMessage `json:"payload,omitempty"`
}
func DecodeControl ¶
type FrameReader ¶
type FrameReader struct {
// contains filtered or unexported fields
}
func NewFrameReader ¶
func NewFrameReader(r io.Reader) *FrameReader
func (*FrameReader) ReadFrame ¶
func (fr *FrameReader) ReadFrame() (Frame, error)
type FrameWriter ¶
type FrameWriter struct {
// contains filtered or unexported fields
}
func NewFrameWriter ¶
func NewFrameWriter(w io.Writer) *FrameWriter
func (*FrameWriter) WriteFrame ¶
func (fw *FrameWriter) WriteFrame(channel byte, payload []byte) error
type HandshakeErrMsg ¶
type HandshakeErrMsg struct {
Reason string `json:"reason"`
}
type HandshakeMsg ¶
type HandshakeMsg struct {
Version string `json:"version"`
ClientID string `json:"client_id"`
TerminalSize [2]uint16 `json:"terminal_size"`
Cwd string `json:"cwd"`
}
Client -> Daemon
type HandshakeOkMsg ¶
type HandshakeOkMsg struct {
Version string `json:"version"`
DaemonVersion string `json:"daemon_version"`
}
Daemon -> Client
type MsgTopicsMsg ¶
type MsgTopicsMsg struct {
Subscriber string `json:"subscriber"`
}
type ScreenPreviewMsg ¶ added in v0.2.0
type ScreenPreviewMsg struct {
SessionID string `json:"session_id"`
}
type ScreenPreviewResponseMsg ¶ added in v0.2.0
type ScreenSnapshotMsg ¶ added in v0.2.0
type ScreenSnapshotMsg struct {
SessionID string `json:"session_id"`
}
type ScreenSnapshotResponseMsg ¶ added in v0.2.0
type ScrollbackMsg ¶
type SessionInfo ¶
type SessionInfo struct {
ID string `json:"id"`
Name string `json:"name"`
RepoPath string `json:"repo_path"`
RepoName string `json:"repo_name"`
WorktreePath string `json:"worktree_path"`
Branch string `json:"branch"`
Agent string `json:"agent"`
AgentSessionID string `json:"agent_session_id,omitempty"`
Status string `json:"status"`
AgentStatus string `json:"agent_status,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
CreatedAt string `json:"created_at"`
LastAttachedAt string `json:"last_attached_at,omitempty"`
Dirty bool `json:"dirty,omitempty"`
UnpushedCount int `json:"unpushed_count,omitempty"`
}
type SessionListMsg ¶
type SessionListMsg struct {
Sessions []SessionInfo `json:"sessions"`
}
type SessionUpdateMsg ¶
Click to show internal directories.
Click to hide internal directories.