Documentation
¶
Index ¶
- Constants
- func BinaryHash(path string) (string, error)
- func DefaultRecordDir() (string, error)
- func DefaultSocketPath() (string, error)
- func DefaultStateDir() (string, error)
- func DefaultTranscriptDir() (string, error)
- func FindSessiondBinary() (string, error)
- func WaitForShutdown(ctx context.Context, socketPath string) error
- type AckRequest
- type AttachRequest
- type BacklogRequest
- type BacklogResponse
- type BootstrapRequest
- type BootstrapResponse
- type Client
- func (c *Client) Ack(ctx context.Context, sessionID, streamID string, bytes int64) error
- func (c *Client) Attach(ctx context.Context, sessionID string, since int64, withBuffer bool, ...) (*Stream, StreamMessage, error)
- func (c *Client) Backlog(ctx context.Context, sessionID string, since int64) (BacklogResponse, error)
- func (c *Client) Bootstrap(ctx context.Context, sessionID string) (BootstrapResponse, error)
- func (c *Client) Create(ctx context.Context, sessionID, cwd string) (CreateResponse, error)
- func (c *Client) Info(ctx context.Context) (InfoResponse, error)
- func (c *Client) List(ctx context.Context) (ListResponse, error)
- func (c *Client) Ping(ctx context.Context) error
- func (c *Client) Resize(ctx context.Context, sessionID string, cols, rows int) error
- func (c *Client) Send(ctx context.Context, sessionID, data string) error
- func (c *Client) Shutdown(ctx context.Context) error
- func (c *Client) ShutdownWithReason(ctx context.Context, source, reason string) error
- func (c *Client) Snapshot(ctx context.Context, sessionID string) (SnapshotResponse, error)
- func (c *Client) Stop(ctx context.Context, sessionID string) error
- type ControlRequest
- type ControlResponse
- type CreateRequest
- type CreateResponse
- type InfoResponse
- type ListResponse
- type Options
- type ResizeRequest
- type SendRequest
- type Server
- type Session
- type SessionInfo
- type ShutdownRequest
- type SnapshotRequest
- type SnapshotResponse
- type StartOptions
- type StopRequest
- type Stream
- type StreamMessage
Constants ¶
View Source
const ProtocolVersion = 2
Variables ¶
This section is empty.
Functions ¶
func BinaryHash ¶
func DefaultRecordDir ¶
func DefaultSocketPath ¶
func DefaultStateDir ¶
func DefaultTranscriptDir ¶
func FindSessiondBinary ¶
Types ¶
type AckRequest ¶
type AttachRequest ¶
type BacklogRequest ¶
type BacklogResponse ¶
type BootstrapRequest ¶
type BootstrapRequest struct {
SessionID string `json:"sessionId"`
}
type BootstrapResponse ¶
type BootstrapResponse struct {
SessionID string `json:"sessionId"`
Snapshot string `json:"snapshot"`
SnapshotSource string `json:"snapshotSource,omitempty"`
Kitty *kitty.Snapshot `json:"kitty,omitempty"`
Backlog string `json:"backlog,omitempty"`
NextOffset int64 `json:"nextOffset,omitempty"`
BacklogTruncated bool `json:"backlogTruncated,omitempty"`
BacklogSource string `json:"backlogSource,omitempty"`
AltScreen bool `json:"altScreen,omitempty"`
MouseMask uint8 `json:"mouseMask,omitempty"`
Mouse bool `json:"mouse,omitempty"`
MouseSGR bool `json:"mouseSGR,omitempty"`
MouseEncoding string `json:"mouseEncoding,omitempty"`
SafeToReplay bool `json:"safeToReplay,omitempty"`
InitialCredit int64 `json:"initialCredit,omitempty"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func EnsureRunningWithOptions ¶
func EnsureRunningWithOptions(ctx context.Context, opts StartOptions) (*Client, error)
func (*Client) ShutdownWithReason ¶
type ControlRequest ¶
type ControlRequest struct {
ProtocolVersion int `json:"protocolVersion"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
}
type ControlResponse ¶
type CreateRequest ¶
type CreateResponse ¶
type InfoResponse ¶
type ListResponse ¶
type ListResponse struct {
Sessions []SessionInfo `json:"sessions"`
}
type Options ¶
type Options struct {
SocketPath string
TranscriptDir string
RecordDir string
StateDir string
IdleTimeout time.Duration
BufferBytes int
TranscriptMaxBytes int64
TranscriptTrimThreshold int64
TranscriptTailBytes int64
SnapshotInterval time.Duration
HistoryLines int
RecordPty bool
StreamCreditTimeout time.Duration
StreamInitialCredit int64
Logger *log.Logger
ProtocolLogEnabled bool
ProtocolLogDir string
ProtocolLogger *unifiedlog.Logger
}
func DefaultOptions ¶
func DefaultOptions() Options
type ResizeRequest ¶
type SendRequest ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) SetShutdown ¶
func (s *Server) SetShutdown(fn func())
type SessionInfo ¶
type ShutdownRequest ¶
type SnapshotRequest ¶
type SnapshotRequest struct {
SessionID string `json:"sessionId"`
}
type SnapshotResponse ¶
type SnapshotResponse struct {
SessionID string `json:"sessionId"`
Data string `json:"data"`
Source string `json:"source,omitempty"`
Kitty *kitty.Snapshot `json:"kitty,omitempty"`
AltScreen bool `json:"altScreen,omitempty"`
MouseMask uint8 `json:"mouseMask,omitempty"`
Mouse bool `json:"mouse,omitempty"`
MouseSGR bool `json:"mouseSGR,omitempty"`
MouseEncoding string `json:"mouseEncoding,omitempty"`
SafeToReplay bool `json:"safeToReplay,omitempty"`
}
type StartOptions ¶
type StopRequest ¶
type StopRequest struct {
SessionID string `json:"sessionId"`
}
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) Next ¶
func (s *Stream) Next(msg *StreamMessage) error
type StreamMessage ¶
type StreamMessage struct {
Type string `json:"type"`
SessionID string `json:"sessionId,omitempty"`
StreamID string `json:"streamId,omitempty"`
Data string `json:"data,omitempty"`
Len int `json:"len,omitempty"`
NextOffset int64 `json:"nextOffset,omitempty"`
Truncated bool `json:"truncated,omitempty"`
Source string `json:"source,omitempty"`
SnapshotSource string `json:"snapshotSource,omitempty"`
BacklogSource string `json:"backlogSource,omitempty"`
BacklogTruncated bool `json:"backlogTruncated,omitempty"`
AltScreen bool `json:"altScreen,omitempty"`
MouseMask uint8 `json:"mouseMask,omitempty"`
Mouse bool `json:"mouse,omitempty"`
MouseSGR bool `json:"mouseSGR,omitempty"`
MouseEncoding string `json:"mouseEncoding,omitempty"`
SafeToReplay bool `json:"safeToReplay,omitempty"`
InitialCredit int64 `json:"initialCredit,omitempty"`
Kitty *kitty.Event `json:"kitty,omitempty"`
Error string `json:"error,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.