Documentation
¶
Index ¶
- Constants
- type AscicastV2Event
- type AscicastV2Header
- type Recorder
- type RecorderFactory
- type RecordingStatus
- type SSHRecorder
- func (r *SSHRecorder) GetData() []byte
- func (r *SSHRecorder) Protocol() audit.Protocol
- func (r *SSHRecorder) Start(ctx context.Context, sessionID string, metadata map[string]interface{}) error
- func (r *SSHRecorder) Status() RecordingStatus
- func (r *SSHRecorder) Stop(ctx context.Context) (string, error)
- func (r *SSHRecorder) Write(timestamp float64, ioType rune, data []byte) error
- type StreamingSSHRecorder
Constants ¶
View Source
const ( RecordingStatusActive = proxy.RecordingStatusActive RecordingStatusRecording = proxy.RecordingStatusRecording RecordingStatusPaused = proxy.RecordingStatusPaused RecordingStatusStopped = proxy.RecordingStatusStopped )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AscicastV2Event ¶
type AscicastV2Event struct {
Timestamp float64 `json:"0"` // 相对时间(秒)
Type string `json:"1"` // "o" 或 "i"
Data string `json:"2"` // 数据内容
}
AscicastV2Event asciicast v2 事件结构
type AscicastV2Header ¶
type AscicastV2Header struct {
Version int `json:"version"`
Width int `json:"width"`
Height int `json:"height"`
Timestamp int64 `json:"timestamp"`
Title string `json:"title,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
AscicastV2Header asciicast v2 头部结构
type RecorderFactory ¶
type RecorderFactory = proxy.RecorderFactory
type SSHRecorder ¶
type SSHRecorder struct {
// contains filtered or unexported fields
}
SSHRecorder SSH 会话录制器(asciicast v2 格式)
func NewSSHRecorder ¶
func NewSSHRecorder(storage audit.ObjectStorage, width, height int) *SSHRecorder
NewSSHRecorder 创建 SSH 录制器
func (*SSHRecorder) Protocol ¶
func (r *SSHRecorder) Protocol() audit.Protocol
Protocol 实现 Recorder 接口
func (*SSHRecorder) Start ¶
func (r *SSHRecorder) Start(ctx context.Context, sessionID string, metadata map[string]interface{}) error
Start 开始录制
type StreamingSSHRecorder ¶
type StreamingSSHRecorder struct {
// contains filtered or unexported fields
}
StreamingSSHRecorder 流式 SSH 录制器(边录边传)
func NewStreamingSSHRecorder ¶
func NewStreamingSSHRecorder(storage audit.ObjectStorage, width, height int) *StreamingSSHRecorder
NewStreamingSSHRecorder 创建流式录制器
func (*StreamingSSHRecorder) Start ¶
func (r *StreamingSSHRecorder) Start(ctx context.Context, sessionID string, metadata map[string]interface{}) error
Start 开始流式录制
Click to show internal directories.
Click to hide internal directories.