processowner

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package processowner defines the small lifecycle contract shared by the test client and its platform-specific descendant supervisor.

Index

Constants

View Source
const (
	MaximumDocumentBytes                = 1 << 20
	MaximumDeadlineMilliseconds         = 3_600_000
	MaximumTerminationGraceMilliseconds = 60_000
)
View Source
const (
	StatusStarted  = "started"
	StatusFinished = "finished"

	ReasonNatural     = "natural"
	ReasonInterrupt   = "interrupt"
	ReasonStop        = "stop"
	ReasonDeadline    = "deadline"
	ReasonParentLost  = "parent_lost"
	ReasonSpawnFailed = "spawn_failed"
)
View Source
const (
	ControlInterrupt byte = 'i'
	ControlStop      byte = 's'
)

Variables

This section is empty.

Functions

func EncodeConfig

func EncodeConfig(config Config) ([]byte, error)

func ValidateConfig

func ValidateConfig(config Config) error

func ValidateStatus

func ValidateStatus(status Status) error

func WriteStatus

func WriteStatus(writer io.Writer, status Status) error

Types

type Config

type Config struct {
	Executable                   string   `json:"executable"`
	Arguments                    []string `json:"arguments"`
	WorkingDirectory             string   `json:"working_directory"`
	Environment                  []string `json:"environment"`
	DeadlineMilliseconds         int64    `json:"deadline_milliseconds"`
	TerminationGraceMilliseconds int64    `json:"termination_grace_milliseconds"`
}

Config contains only inputs required to launch and retire a process tree. Correlation remains in the ordinary child environment and testrun events.

func DecodeConfig

func DecodeConfig(reader io.Reader) (Config, error)

type Result

type Result struct {
	ExitCode     *int64 `json:"exit_code,omitempty"`
	Signal       string `json:"signal,omitempty"`
	Reason       string `json:"reason"`
	Error        string `json:"error,omitempty"`
	CleanupError string `json:"cleanup_error,omitempty"`
}

Result reports the target's observable terminal state after descendant cleanup has completed. It is diagnostic state, not an authenticated proof.

type Status

type Status struct {
	State  string  `json:"state"`
	Result *Result `json:"result,omitempty"`
}

type StatusDecoder

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

func NewStatusDecoder

func NewStatusDecoder(reader io.Reader) *StatusDecoder

func (*StatusDecoder) Next

func (decoder *StatusDecoder) Next() (Status, error)

Directories

Path Synopsis
Package linuxsubreaper owns one test process tree behind a Linux subreaper.
Package linuxsubreaper owns one test process tree behind a Linux subreaper.
Package windowsjob owns one test process tree in a kill-on-close Job Object.
Package windowsjob owns one test process tree in a kill-on-close Job Object.

Jump to

Keyboard shortcuts

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