cli

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute added in v0.6.0

func Execute(opts RunOptions) error

Execute handles the 'run' command logic, dispatching to Session or Watch mode.

func ResetSession added in v0.6.0

func ResetSession(sessionID string)

ResetSession clears the session data for the given ID.

func RunSession added in v0.3.3

func RunSession(repoPath string, headless bool, jsonMode bool, debug bool, initialContext map[string]any, sessionID string) error

RunSession executes a single session of Trellis.

func RunWatch

func RunWatch(repoPath string, sessionID string, debug bool, fresh bool)

RunWatch executes Trellis in development mode, reloading on file changes. RunWatch executes Trellis in development mode, reloading on file changes.

Types

type InterruptibleReader

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

InterruptibleReader wraps an io.Reader (like os.Stdin) and checks for a cancellation signal.

func NewInterruptibleReader

func NewInterruptibleReader(base io.Reader, cancel <-chan struct{}) *InterruptibleReader

func (*InterruptibleReader) Read

func (r *InterruptibleReader) Read(p []byte) (n int, err error)

type RunOptions added in v0.6.0

type RunOptions struct {
	RepoPath  string
	Headless  bool
	Watch     bool
	JSON      bool
	Debug     bool
	Context   string // Raw JSON string
	SessionID string
	Fresh     bool
}

RunOptions contains all the configuration for the Run command.

type SignalContext added in v0.6.0

type SignalContext struct {
	context.Context
	Cancel func()
	// contains filtered or unexported fields
}

SignalContext wraps a context and captures the signal that cancelled it.

func NewSignalContext added in v0.6.0

func NewSignalContext(parent context.Context) *SignalContext

NewSignalContext creates a context that is cancelled on SIGINT or SIGTERM. It acts as a drop-in replacement for signal.NotifyContext but allows retrieving the signal.

func (*SignalContext) Signal added in v0.6.0

func (sc *SignalContext) Signal() os.Signal

Signal returns the signal that caused the context to be cancelled, or nil.

Jump to

Keyboard shortcuts

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