Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
ExecuteInvoked bool
ExecuteFn func(context.Context, string, ...string) ([]byte, error)
ExecuteSplitInvoked bool
ExecuteSplitFn func(context.Context, string, ...string) (stdout, stderr []byte, err error)
}
Executor is a mock implementation of the command executor interface. It implements the same interface as mcp.Executor through structural typing.
type ProcessStarter ¶ added in v0.51.0
type ProcessStarter struct {
StartInvoked bool
StartFn func(ctx context.Context, subcommand string, args ...string) (pid int, host, port string, stop func() error, err error)
}
ProcessStarter is a mock implementation of the process-starter interface used by the "run" tool. It avoids spawning real subprocesses in tests. It implements the same interface as mcp.processStarter through structural typing.
func NewProcessStarter ¶ added in v0.51.0
func NewProcessStarter() *ProcessStarter
NewProcessStarter creates a new mock process starter.
func (*ProcessStarter) Start ¶ added in v0.51.0
func (m *ProcessStarter) Start(ctx context.Context, subcommand string, args ...string) (pid int, host, port string, stop func() error, err error)
Start implements the processStarter interface, recording invocation details and delegating to StartFn if provided.
Click to show internal directories.
Click to hide internal directories.