taskrunner

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanupResult

type CleanupResult struct {
	Attempted bool
	Err       error
}

type Kind

type Kind string
const (
	Success          Kind = "success"
	ChildFailure     Kind = "child_failure"
	DeadlineExceeded Kind = "deadline_exceeded"
	StartFailure     Kind = "start_failure"
	CleanupFailure   Kind = "cleanup_failure"
	InvalidRequest   Kind = "invalid_request"
)

type OutputMode

type OutputMode uint8
const (
	Stream OutputMode = iota
	Capture
)

type ProcessAccounting

type ProcessAccounting struct {
	Supported bool

	UserCPUNanos   int64
	KernelCPUNanos int64
	TotalCPUNanos  int64

	TotalProcesses      uint32
	ActiveProcesses     uint32
	TerminatedProcesses uint32
	PageFaults          uint32

	ReadOperations  uint64
	WriteOperations uint64
	OtherOperations uint64

	ReadBytes  uint64
	WriteBytes uint64
	OtherBytes uint64
}

type Request

type Request struct {
	Argv           []string
	Dir            string
	Env            []string
	ClearEnv       bool
	Timeout        time.Duration
	Context        context.Context
	Output         OutputMode
	StreamOut      io.Writer
	StreamErr      io.Writer
	StdoutLimit    int
	StderrLimit    int
	AggregateLimit int
	HeadLimit      int
	TailLimit      int
	Label          string
	Redactions     []string
	RestrictAdmin  bool
}

type Result

type Result struct {
	Kind            Kind
	ExitCode        int
	Label           string
	Dir             string
	DurationClass   string
	Elapsed         time.Duration
	Accounting      ProcessAccounting
	AccountingErr   error
	Stdout          []byte
	Stderr          []byte
	StdoutTruncated bool
	StderrTruncated bool
	Cleanup         CleanupResult
	Err             error
}

func Run

func Run(ctx context.Context, req Request) (result Result)

Directories

Path Synopsis
cmd
lip-taskrunner command

Jump to

Keyboard shortcuts

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