internal

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name string `yaml:"name"`
	Exec string `yaml:"exec"`
	Glob string `yaml:"glob"`
	Cwd  string `yaml:"cwd"`

	LogTail string
	Status  CommandStatus
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(configPath string) []*Command

type CommandStatus

type CommandStatus int
const (
	StatusTrying CommandStatus = iota
	StatusOk
	StatusFailed
)

type CommandStreamMsg

type CommandStreamMsg struct {
	Command *Command
	Line    string
	Err     error
	Done    bool
}

type CommandWatcher

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

func NewCommandWatcher

func NewCommandWatcher(c *Command, onUpdate func(*Command, string)) *CommandWatcher

func (*CommandWatcher) Start

func (cw *CommandWatcher) Start()

type Config

type Config struct {
	Commands []*Command `yaml:"commands"`
}

type Debouncer

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

func NewDebouncer

func NewDebouncer(cooldown time.Duration) *Debouncer

func (*Debouncer) Do

func (d *Debouncer) Do(key string, delay time.Duration, fn func())

type DiscardHandler added in v0.1.2

type DiscardHandler struct{}

func (DiscardHandler) Enabled added in v0.1.2

func (h DiscardHandler) Enabled(_ context.Context, _ slog.Level) bool

func (DiscardHandler) Handle added in v0.1.2

func (h DiscardHandler) Handle(_ context.Context, _ slog.Record) error

func (DiscardHandler) WithAttrs added in v0.1.2

func (h DiscardHandler) WithAttrs(_ []slog.Attr) slog.Handler

func (DiscardHandler) WithGroup added in v0.1.2

func (h DiscardHandler) WithGroup(_ string) slog.Handler

type Execer

type Execer struct {
	Command  *Command
	Callback ExecerCallback
}

func NewExecer

func NewExecer(c *Command, cb ExecerCallback) *Execer

func (*Execer) Start

func (e *Execer) Start()

func (*Execer) Stop added in v0.1.2

func (e *Execer) Stop() error

type ExecerCallback

type ExecerCallback func(c *Command, line string, err error, done bool)

type FileEventMsg

type FileEventMsg struct {
	Command *Command
	Message string
}

Jump to

Keyboard shortcuts

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