Movatterモバイル変換


[0]ホーム

URL:


runner

package
v1.3.1Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License:GPL-3.0Imports:8Imported by:0

Details

Repository

github.com/arduino/arduino-cli

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeResult

type Result struct {Args   []stringStdout []byteStderr []byteErrorerror}

Result contains the output of a command execution

typeRunner

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

Runner is a helper to run commands in a queue, the commands are immediately exectudedin a goroutine as they are enqueued. The runner can be stopped by calling Cancel.

funcNew

func New(inCtxcontext.Context, workersint) *Runner

New creates a new Runner with the given number of workers.If workers is 0, the number of workers will be the number of available CPUs.

func (*Runner)Cancel

func (r *Runner) Cancel()

func (*Runner)Enqueue

func (r *Runner) Enqueue(task *Task)

func (*Runner)Results

func (r *Runner) Results(task *Task) *Result

typeTask

type Task struct {Args        []string `json:"args"`LimitStderrint      `json:"-"`}

Task is a command to be executed

funcNewTask

func NewTask(args ...string) *Task

NewTask creates a new Task

funcNewTaskWithLimitedStderr

func NewTaskWithLimitedStderr(limitint, args ...string) *Task

NewTaskWithLimitedStderr creates a new Task with a hard-limit on the stderr output

func (*Task)Run

func (t *Task) Run(ctxcontext.Context) *Result

Run executes the command and returns the result

func (*Task)String

func (t *Task) String()string

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp