process

package
v2.23.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 1 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// Pid contains process id.
	Pid int64 `json:"pid"`

	// Status of the worker.
	Status int64 `json:"status"`

	// Number of worker executions.
	NumExecs uint64 `json:"numExecs"`

	// Created is unix nano timestamp of worker creation time.
	Created int64 `json:"created"`

	// MemoryUsage holds the information about worker memory usage in bytes.
	// Values might vary for different operating systems and based on RSS.
	MemoryUsage uint64 `json:"memoryUsage"`

	// CPU_Percent returns how many percent of the CPU time this process uses
	CPUPercent float64 `json:"CPUPercent"`

	// Command used in the service plugin and shows a command for the particular service
	Command string `json:"Command"`

	// Status
	StatusStr string
}

State provides information about specific worker.

type Stater added in v2.23.0

type Stater interface {
	fmt.Stringer
	// Pid contains process id
	Pid() int64
	// Status of the worker
	Status() int64
	// NumExecs is number of worker executions.
	NumExecs() uint64
	// Created is unix nano timestamp of worker creation time.
	Created() int64
	// MemoryUsage holds the information about worker memory usage in bytes.
	// Values might vary for different operating systems and based on RSS.
	MemoryUsage() uint64
	// CPUPercent returns how many percent of the CPU time this process uses
	CPUPercent() float64
	// Command used in the service plugin and shows a command for the particular service
	Command() string
}

Stater represents a worker state [BETA, internal]

Jump to

Keyboard shortcuts

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