types

package module
v0.0.0-...-c2cae38 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortProcessInfos

func SortProcessInfos(processes []ProcessInfo)

SortProcessInfos sorts the process information by program name

Types

type BooleanReply

type BooleanReply struct {
	Success bool
}

BooleanReply any rpc result with BooleanReply type

type ProcessInfo

type ProcessInfo struct {
	Name          string `xml:"name" json:"name"`
	Group         string `xml:"group" json:"group"`
	Description   string `xml:"description" json:"description"`
	Start         int    `xml:"start" json:"start"`
	Stop          int    `xml:"stop" json:"stop"`
	Now           int    `xml:"now" json:"now"`
	State         int    `xml:"state" json:"state"`
	Statename     string `xml:"statename" json:"statename"`
	Spawnerr      string `xml:"spawnerr" json:"spawnerr"`
	Exitstatus    int    `xml:"exitstatus" json:"exitstatus"`
	Logfile       string `xml:"logfile" json:"logfile"`
	StdoutLogfile string `xml:"stdout_logfile" json:"stdout_logfile"`
	StderrLogfile string `xml:"stderr_logfile" json:"stderr_logfile"`
	Pid           int    `xml:"pid" json:"pid"`
}

ProcessInfo the running process information

func (ProcessInfo) GetFullName

func (pi ProcessInfo) GetFullName() string

GetFullName returns full name of program including group and name

type ProcessNameSorter

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

ProcessNameSorter sort the process info by program name

func NewProcessNameSorter

func NewProcessNameSorter(processes []ProcessInfo) *ProcessNameSorter

NewProcessNameSorter creates new ProcessNameSorter object

func (*ProcessNameSorter) Len

func (pns *ProcessNameSorter) Len() int

Len returns amount of programs

func (*ProcessNameSorter) Less

func (pns *ProcessNameSorter) Less(i, j int) bool

Less returns true if program name of i-th process is less than the program name of j-th process

func (*ProcessNameSorter) Swap

func (pns *ProcessNameSorter) Swap(i, j int)

Swap i-th program and j-th program

type ProcessSignal

type ProcessSignal struct {
	Name   string
	Signal string
}

ProcessSignal process signal includes program name and signal sent to it

type ReloadConfigResult

type ReloadConfigResult struct {
	AddedGroup   []string
	ChangedGroup []string
	RemovedGroup []string
}

ReloadConfigResult the result of supervisor configuration reloading

Jump to

Keyboard shortcuts

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