output

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FormatMap = map[string]Output{}

Functions

This section is empty.

Types

type ConsoleOutput

type ConsoleOutput struct {
	Writer io.Writer
	Style  table.Style
}

func (*ConsoleOutput) SetWriter

func (o *ConsoleOutput) SetWriter(writer io.Writer)

func (*ConsoleOutput) Write

func (o *ConsoleOutput) Write(processConfigList config.ProcessConfigList, processList process.List, columnIds []string) error

type JsonConsoleOutput

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

func (*JsonConsoleOutput) SetWriter

func (j *JsonConsoleOutput) SetWriter(writer io.Writer)

func (*JsonConsoleOutput) Write

func (j *JsonConsoleOutput) Write(processConfigList config.ProcessConfigList, processList process.List, _ []string) error

type JsonInfoEntry

type JsonInfoEntry struct {
	Name                  string       `json:"name"`
	Group                 string       `json:"group"`
	ConfiguredCommand     []string     `json:"configuredCommand"`
	RunningCommand        []string     `json:"runningCommand"`
	IsRunning             bool         `json:"isRunning"`
	DirtyCommand          bool         `json:"dirtyCommand"`
	DirtyCommandInfo      string       `json:"dirtyCommandInfo"`
	FileHashesChanged     bool         `json:"fileHashesChanged"`
	FileHashesChangedInfo string       `json:"fileHashesChangedInfo"`
	DirtyMetadata         bool         `json:"dirtyMetadata"`
	DirtyMetadataInfo     string       `json:"dirtyMetadataInfo"`
	DirtyEnv              bool         `json:"dirtyEnv"`
	DirtyEnvInfo          string       `json:"dirtyEnvInfo"`
	Dirty                 bool         `json:"dirty"`
	Info                  *ProcessInfo `json:"info"`
}

type Output

type Output interface {
	Write(processConfigList config.ProcessConfigList, processList process.List, columnIds []string) error
	SetWriter(writer io.Writer)
}

type ProcessInfo

type ProcessInfo struct {
	Pid              int32                    `json:"pid"`
	Nice             int32                    `json:"nice"`
	Cwd              string                   `json:"cwd"`
	IsRunning        bool                     `json:"isRunning"`
	CPUPercent       float64                  `json:"cpuPercent"`
	Connections      []net.ConnectionStat     `json:"connections"`
	Command          []string                 `json:"command"`
	MemoryInfo       *gopsutil.MemoryInfoStat `json:"memoryInfo"`
	Exe              string                   `json:"exe"`
	Username         string                   `json:"username"`
	Terminal         string                   `json:"terminal"`
	CreateTime       int64                    `json:"createTime"`
	CreateTimeString string                   `json:"createTimeString"`
}

Jump to

Keyboard shortcuts

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