types

package
v0.0.0-...-d23ef4a Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MIT Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	models.ProcessParam
	Pid        int               `json:"pid"`
	PidFile    string            `json:"pid_file"`
	StdIn      io.WriteCloser    `json:"-"`
	StdOut     io.ReadCloser     `json:"-"`
	StdErr     io.ReadCloser     `json:"-"`
	DataOut    io.ReadCloser     `json:"-"`
	Statistics ProcessStatistics `json:"statistics"`
	Status     ProcessStatus     `json:"status,string"`
	Process    *os.Process       `json:"-"`
}

type ProcessStatistics

type ProcessStatistics struct {
	Restarts  int           `json:"restart_count"`
	StartTime time.Time     `json:"start_time"`
	UpTime    time.Duration `json:"uptime"`
}

ProcessStatistics is a wrapper with the process current Statistics info.

func (*ProcessStatistics) AddRestart

func (p *ProcessStatistics) AddRestart()

func (*ProcessStatistics) InitUpTime

func (p *ProcessStatistics) InitUpTime()

func (*ProcessStatistics) ResetUpTime

func (p *ProcessStatistics) ResetUpTime()

func (*ProcessStatistics) SetUpTime

func (p *ProcessStatistics) SetUpTime()

type ProcessStatus

type ProcessStatus int
const (
	Prepare ProcessStatus = iota
	Running
	Exiting
	Exited
)

func (ProcessStatus) GoString

func (i ProcessStatus) GoString() string

func (ProcessStatus) MarshalText

func (i ProcessStatus) MarshalText() ([]byte, error)

func (ProcessStatus) String

func (i ProcessStatus) String() string

Jump to

Keyboard shortcuts

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