process

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByCPU

type ByCPU struct{ Processes }

ByCPU プロセスリストのソートをCPU利用率で行う

func (ByCPU) Less

func (bc ByCPU) Less(i, j int) bool

Less with Sort interface

type ByMEM

type ByMEM struct{ Processes }

ByMEM プロセスリストのソートをメモリ利用率で行う

func (ByMEM) Less

func (bm ByMEM) Less(i, j int) bool

Less with Sort interface

type ByPID

type ByPID struct{ Processes }

ByPID プロセスリストのソートをPIDで行う

func (ByPID) Less

func (bp ByPID) Less(i, j int) bool

Less with Sort interface

type MiniProcessData

type MiniProcessData struct {
	Pid        int32
	MemPercent float32
	CPUPercent float64
	Name       string
}

MiniProcessData プロセスリストのソート用構造体

type Processes

type Processes []MiniProcessData

Processes プロセスリストの配列構造体

func (Processes) Len

func (p Processes) Len() int

Len with Sort interface

func (Processes) Swap

func (p Processes) Swap(i, j int)

Swap with Sort interface

type Service

type Service struct {
	Processes Processes
	// contains filtered or unexported fields
}

Service プロセスリストのデータサービス

func GetInstance

func GetInstance() *Service

GetInstance is get singleton instance

func (*Service) ChangeSortKey

func (p *Service) ChangeSortKey(key SortKey)

ChangeSortKey ソートキーを変更する

func (*Service) GetIsReverse

func (p *Service) GetIsReverse() bool

GetIsReverse 現在の並び順を取得する

func (*Service) GetSelectedIndex

func (p *Service) GetSelectedIndex() int

GetSelectedIndex 選択中カラムの位置を取得する

func (*Service) GetSortKey

func (p *Service) GetSortKey() SortKey

GetSortKey 現在のソートキーを取得する

func (*Service) IncrementSelectedIndex

func (p *Service) IncrementSelectedIndex(incre int)

IncrementSelectedIndex 選択中カラムの位置をインクリメントする

func (*Service) Initialize

func (p *Service) Initialize()

Initialize with DataService interface

type SortKey

type SortKey int

SortKey 配列のキー識別子

const (
	// Pid プロセスID
	Pid SortKey = iota

	// Name プロセス名
	Name

	// CPU CPU利用率
	CPU

	// Memory メモリ利用率
	Memory
)

Jump to

Keyboard shortcuts

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