handlercommand

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissing = errors.New("missing command")

Functions

This section is empty.

Types

type Command

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

func New

func New(opts Options) (*Command, error)

New instantiates a command for a changed file.

func (*Command) Run

func (c *Command) Run(ctx context.Context) (err error)

type MetricsReporter added in v0.0.3

type MetricsReporter interface {
	ReportProcessState(exitCode int, wallTime, userTime, systemTime time.Duration)
}

type Options

type Options struct {
	Logger *zap.Logger

	// Path to the changed file.
	SourceFile string

	// Directory for storing execution-related files.
	BaseDir string

	// Command arguments.
	Command []string

	// Interface for reporting command-specific metrics.
	Metrics MetricsReporter
}

Jump to

Keyboard shortcuts

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