executor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MPL-2.0 Imports: 1 Imported by: 0

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