tasks

package
v0.0.0-...-4c7982d Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: BSD-3-Clause Imports: 10 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 {
	// contains filtered or unexported fields
}

Manager manages tasks by key

func NewManager

func NewManager(prefix string, workingDir string) (*Manager, error)

NewManager creates LocalFileSaver instance

func (*Manager) Close

func (m *Manager) Close() error

Close terminates runnig preocess if any

func (*Manager) EnsureRunning

func (m *Manager) EnsureRunning(in map[string]string) error

EnsureRunning loads data by key and ensure it is running

type ProcessRunner

type ProcessRunner interface {
	Run(cmd string, env []string) error
	Close() error
	Running() bool
}

ProcessRunner executes external process and manages it

type Runner

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

Runner executes external process and manages it

func NewRunner

func NewRunner(workingDir string) (*Runner, error)

NewRunner inits new runner instance

func (*Runner) Close

func (r *Runner) Close() error

Close terminates runnig preocess if any

func (*Runner) Run

func (r *Runner) Run(cmdStr string, envs []string) error

Run starts the preocess

func (*Runner) Running

func (r *Runner) Running() bool

Running returns the running status

Jump to

Keyboard shortcuts

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