server

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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 {
	Send(msg string) error
}

func NewDefaultClient added in v0.7.3

func NewDefaultClient(ctx context.Context) (Client, error)

type Option added in v0.7.6

type Option func(*UnixSocketServer)

func WithCommandRecordedHook added in v0.7.6

func WithCommandRecordedHook(hook func(string)) Option

func WithIgnoreErrors added in v0.8.0

func WithIgnoreErrors(ignoreErrors bool) Option

func WithLogger added in v0.8.0

func WithLogger(logger *slog.Logger) Option

type RecordedCommand added in v0.8.2

type RecordedCommand struct {
	Command string `json:"command"`
	Prompt  string `json:"prompt,omitempty"`
}

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"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL