Documentation ¶
Index ¶
- type ClientHandshake
- type ServerHandshake
- type SessionStream
- func (s *SessionStream) Close() error
- func (s *SessionStream) Done() <-chan struct{}
- func (s *SessionStream) ForceTerminate() error
- func (s *SessionStream) ForceTerminateQueue() <-chan struct{}
- func (s *SessionStream) Read(p []byte) (int, error)
- func (s *SessionStream) Resize(size *remotecommand.TerminalSize) error
- func (s *SessionStream) ResizeQueue() <-chan *remotecommand.TerminalSize
- func (s *SessionStream) Write(data []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientHandshake ¶
type ClientHandshake struct {
Mode types.SessionParticipantMode `json:"mode"`
}
ClientHandshake is the first message sent by a client to inform a server of it's intentions.
type ServerHandshake ¶
type ServerHandshake struct {
MFARequired bool `json:"mfa_required"`
}
ServerHandshake is the first message sent by a server to inform a client of the session settings.
type SessionStream ¶
type SessionStream struct { MFARequired bool Mode types.SessionParticipantMode // contains filtered or unexported fields }
SessionStream represents one end of the bidirectional session connection.
func NewSessionStream ¶
func NewSessionStream(conn *websocket.Conn, handshake any) (*SessionStream, error)
NewSessionStream creates a new session stream. The type of the handshake parameter determines if this is the client or server end.
func (*SessionStream) Done ¶
func (s *SessionStream) Done() <-chan struct{}
func (*SessionStream) ForceTerminate ¶
func (s *SessionStream) ForceTerminate() error
ForceTerminate sends a force termination request to the other end.
func (*SessionStream) ForceTerminateQueue ¶
func (s *SessionStream) ForceTerminateQueue() <-chan struct{}
ForceTerminateQueue returns the channel used for force termination requests.
func (*SessionStream) Resize ¶
func (s *SessionStream) Resize(size *remotecommand.TerminalSize) error
Resize sends a resize request to the other party.
func (*SessionStream) ResizeQueue ¶
func (s *SessionStream) ResizeQueue() <-chan *remotecommand.TerminalSize
ResizeQueue returns a channel that will receive resize requests.