wrapper

package
v0.0.0-...-12e5487 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxIPCMessageBytes caps IPC messages to prevent unbounded memory usage.
	// Responses exceeding this size are treated as an error.
	MaxIPCMessageBytes = 64 * 1024 // 64 KiB
)

Variables

This section is empty.

Functions

func Run

func Run(cmd []string, opts ...WrapperOption) error

Run executes a command with pre- and post-run hook evaluation

Types

type WrapperCommand

type WrapperCommand struct {
	Hook       hook.Hook // Single hook for command evaluation
	SocketPath string
	Verbose    bool
}

WrapperCommand implements the "run" subcommand that acts as a wrapper

func NewWrapperCommand

func NewWrapperCommand(hook hook.Hook, opts ...WrapperOption) *WrapperCommand

NewWrapperCommand creates a WrapperCommand with functional options

func (*WrapperCommand) Run

func (w *WrapperCommand) Run(command []string) error

Run executes a command with pre- and post-run hook evaluation

func (*WrapperCommand) SetSocketPath

func (w *WrapperCommand) SetSocketPath(path string)

SetSocketPath sets the IPC socket path for IPC evaluation

func (*WrapperCommand) SetVerbose

func (w *WrapperCommand) SetVerbose(verbose bool)

SetVerbose enables/disables verbose output

type WrapperOption

type WrapperOption func(*WrapperCommand)

WrapperOption is a functional option for configuring WrapperCommand

func WithSocketPath

func WithSocketPath(path string) WrapperOption

WithSocketPath sets the IPC socket path for fallback evaluation

func WithVerbose

func WithVerbose(verbose bool) WrapperOption

WithVerbose enables/disables verbose output

Jump to

Keyboard shortcuts

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