command

package
v0.0.0-...-e8670d8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	*exec.Cmd
	// contains filtered or unexported fields
}

Manager has the running program initialized by the tunnel.

func NewManager

func NewManager(logger log.Logger, output io.Writer) *Manager

Returns a new command manager.

func (*Manager) Kill

func (m *Manager) Kill() error

Kills the process.

func (*Manager) Run

func (m *Manager) Run(command []string) error

Runs the command.

func (*Manager) Stop

func (m *Manager) Stop() error

Stops the process, wait for it to stop.

type Watcher

type Watcher struct {
	*fsnotify.Watcher
	// contains filtered or unexported fields
}

Watcher holds a wrapper for a fsnotify.Watcher. It debounces the events.

func NewWatcher

func NewWatcher(cfg *config.Config, logger log.Logger) *Watcher

Returns a NewWatcher.

func (*Watcher) Activity

func (w *Watcher) Activity() <-chan *fsnotify.Event

Returns the Activity channel.

func (*Watcher) Close

func (w *Watcher) Close() error

Closes the underlying fsnotify.Watcher, if initialized.

func (*Watcher) Run

func (w *Watcher) Run()

Runs the watching loop.

Jump to

Keyboard shortcuts

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