Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultSocketPath = "/tmp/savvy-socket"
Variables ¶
View Source
var ErrAbortRecording = errors.New("abort recording")
View Source
var ErrStartingRecordingSession = errors.New("failed to start recording session")
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.7.3
type Client interface { // SendFileInfo tells the server to read the file at the given path SendFileInfo(filePath string) error ShutdownSender }
type ErrConcurrentRecordingSession ¶ added in v0.10.1
type ErrConcurrentRecordingSession struct {
SocketPath string
}
func (*ErrConcurrentRecordingSession) Error ¶ added in v0.10.1
func (e *ErrConcurrentRecordingSession) Error() string
type Option ¶ added in v0.7.6
type Option func(*UnixSocketServer)
func WithCommandRecordedHook ¶ added in v0.7.6
func WithIgnoreErrors ¶ added in v0.8.0
func WithLogger ¶ added in v0.8.0
type RecordedCommand ¶ added in v0.8.2
type RecordedData ¶ added in v0.8.0
type RecordedData struct { Command string `json:"command"` StepID string `json:"step_id"` ExitCode int `json:"exit_code"` Prompt string `json:"prompt,omitempty"` Filepath string `json:"filepath,omitempty"` FileData []byte `json:"file_data,omitempty"` FileMode fs.FileMode `json:"file_mode,omitempty"` }
func (*RecordedData) HasFileData ¶ added in v0.10.0
func (rd *RecordedData) HasFileData() bool
func (*RecordedData) IsShutdown ¶ added in v0.10.1
func (rd *RecordedData) IsShutdown() bool
type ShutdownSender ¶ added in v0.11.4
type ShutdownSender interface { // Shutdown tells the server to shutdown. SendShutdown() error }
type UnixSocketServer ¶
type UnixSocketServer struct {
// contains filtered or unexported fields
}
func NewUnixSocketServer ¶
func NewUnixSocketServer(socketPath string, opts ...Option) (*UnixSocketServer, error)
func NewUnixSocketServerWithDefaultPath ¶ added in v0.7.3
func NewUnixSocketServerWithDefaultPath(opts ...Option) (*UnixSocketServer, error)
func (*UnixSocketServer) Close ¶
func (s *UnixSocketServer) Close() error
func (*UnixSocketServer) Commands ¶
func (s *UnixSocketServer) Commands() []*RecordedCommand
func (*UnixSocketServer) ListenAndServe ¶
func (s *UnixSocketServer) ListenAndServe()
func (*UnixSocketServer) SocketPath ¶ added in v0.7.3
func (s *UnixSocketServer) SocketPath() string
Click to show internal directories.
Click to hide internal directories.