executor

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MPL-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectExecutor

type DirectExecutor struct {
	// contains filtered or unexported fields
}

DirectExecutor executes commands by calling the handler directly. Used by the REPL to avoid IPC round-trip.

func NewDirectExecutor

func NewDirectExecutor(handler ipc.Handler) *DirectExecutor

NewDirectExecutor creates a new direct executor with the given handler.

func (*DirectExecutor) Close

func (e *DirectExecutor) Close() error

Close is a no-op for direct executor.

func (*DirectExecutor) Execute

func (e *DirectExecutor) Execute(req ipc.Request) (ipc.Response, error)

Execute calls the handler directly and returns the response.

type Executor

type Executor interface {
	Execute(req ipc.Request) (ipc.Response, error)
	Close() error
}

Executor executes commands and returns responses. Implementations handle the transport mechanism (IPC, TCP, direct call).

type IPCExecutor

type IPCExecutor struct {
	// contains filtered or unexported fields
}

IPCExecutor executes commands via Unix socket IPC.

func NewIPCExecutor

func NewIPCExecutor() (*IPCExecutor, error)

NewIPCExecutor creates a new IPC executor connected to the daemon.

func NewIPCExecutorPath

func NewIPCExecutorPath(socketPath string) (*IPCExecutor, error)

NewIPCExecutorPath creates a new IPC executor connected to a specific socket path.

func NewIPCExecutorWithDebug

func NewIPCExecutorWithDebug(debug bool) (*IPCExecutor, error)

NewIPCExecutorWithDebug creates a new IPC executor with debug flag.

func (*IPCExecutor) Close

func (e *IPCExecutor) Close() error

Close closes the IPC connection.

func (*IPCExecutor) Execute

func (e *IPCExecutor) Execute(req ipc.Request) (ipc.Response, error)

Execute sends a request via IPC and returns the response. Automatically sets the Debug flag on the request based on executor config.

Jump to

Keyboard shortcuts

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