views

package
Version: v0.0.0-...-9bed95b Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	O_ACCMODE   = 0x3
	O_APPEND    = 0x400
	O_ASYNC     = 0x2000
	O_CREAT     = 0x40
	O_DIRECT    = 0x4000
	O_DIRECTORY = 0x10000
	O_DSYNC     = 0x1000
	O_EXCL      = 0x80
	O_NOATIME   = 0x40000
	O_NOCTTY    = 0x100
	O_NOFOLLOW  = 0x20000
	O_NONBLOCK  = 0x800
	O_RDONLY    = 0x0
	O_RDWR      = 0x2
	O_SYNC      = 0x101000
	O_TRUNC     = 0x200
	O_WRONLY    = 0x1
)
View Source
const (
	PF_EXITING        = 0x00000004 // getting shut down
	PF_EXITPIDONE     = 0x00000008 // pi exit done on shut down
	PF_VCPU           = 0x00000010 // I'm a virtual CPU
	PF_WQ_WORKER      = 0x00000020 // I'm a workqueue worker
	PF_FORKNOEXEC     = 0x00000040 // forked but didn't exec
	PF_MCE_PROCESS    = 0x00000080 // process policy on mce errors
	PF_SUPERPRIV      = 0x00000100 // used super-user privileges
	PF_DUMPCORE       = 0x00000200 // dumped core
	PF_SIGNALED       = 0x00000400 // killed by a signal
	PF_MEMALLOC       = 0x00000800 // Allocating memory
	PF_NPROC_EXCEEDED = 0x00001000 // set_user noticed that RLIMIT_NPROC was exceeded
	PF_USED_MATH      = 0x00002000 // if unset the fpu must be initialized before use
	PF_USED_ASYNC     = 0x00004000 // used async_schedule*(), used by module init
	PF_NOFREEZE       = 0x00008000 // this thread should not be frozen
	PF_FROZEN         = 0x00010000 // frozen for system suspend
	PF_FSTRANS        = 0x00020000 // inside a filesystem transaction
	PF_KSWAPD         = 0x00040000 // I am kswapd
	PF_MEMALLOC_NOIO  = 0x00080000 // Allocating memory without IO involved
	PF_LESS_THROTTLE  = 0x00100000 // Throttle me less: I clean memory
	PF_KTHREAD        = 0x00200000 // I am a kernel thread
	PF_RANDOMIZE      = 0x00400000 // randomize virtual address space
	PF_SWAPWRITE      = 0x00800000 // Allowed to write to swap
	PF_NO_SETAFFINITY = 0x04000000 // Userland is not allowed to meddle with cpus_allowed
	PF_MCE_EARLY      = 0x08000000 // Early kill for mce process policy
	PF_MUTEX_TESTER   = 0x20000000 // Thread belongs to the rt mutex tester
	PF_FREEZER_SKIP   = 0x40000000 // Freezer should not count it as freezable
	PF_SUSPEND_TASK   = 0x80000000 // this thread called freeze_processes and should not be frozen
)

taken cursor https://pkg.go.dev/github.com/vosst/csi/proc/pid

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUView

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

func NewCPUView

func NewCPUView() *CPUView

func (*CPUView) AvailableFor

func (v *CPUView) AvailableFor(pid int) bool

func (*CPUView) Drawable

func (v *CPUView) Drawable() ui.Drawable

func (*CPUView) Event

func (v *CPUView) Event(e ui.Event)

func (*CPUView) Reset

func (v *CPUView) Reset()

func (*CPUView) Title

func (v *CPUView) Title() string

func (*CPUView) Update

func (v *CPUView) Update(state *host.State) error

type FDView

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

func NewFDView

func NewFDView() *FDView

func (*FDView) AvailableFor

func (v *FDView) AvailableFor(pid int) bool

func (*FDView) Drawable

func (v *FDView) Drawable() ui.Drawable

func (*FDView) Event

func (v *FDView) Event(e ui.Event)

func (*FDView) Reset

func (v *FDView) Reset()

func (*FDView) Title

func (v *FDView) Title() string

func (*FDView) Update

func (v *FDView) Update(state *host.State) error

type INFOView

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

func NewINFOView

func NewINFOView() *INFOView

func (*INFOView) AvailableFor

func (v *INFOView) AvailableFor(pid int) bool

func (*INFOView) Drawable

func (v *INFOView) Drawable() ui.Drawable

func (*INFOView) Event

func (v *INFOView) Event(e ui.Event)

func (*INFOView) Reset

func (v *INFOView) Reset()

func (*INFOView) Title

func (v *INFOView) Title() string

func (*INFOView) Update

func (v *INFOView) Update(state *host.State) error

type IOView

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

func NewIOView

func NewIOView() *IOView

func (*IOView) AvailableFor

func (v *IOView) AvailableFor(pid int) bool

func (*IOView) Drawable

func (v *IOView) Drawable() ui.Drawable

func (*IOView) Event

func (v *IOView) Event(e ui.Event)

func (*IOView) Reset

func (v *IOView) Reset()

func (*IOView) Title

func (v *IOView) Title() string

func (*IOView) Update

func (v *IOView) Update(state *host.State) error

type MAPSView

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

func NewMAPSView

func NewMAPSView() *MAPSView

func (*MAPSView) AvailableFor

func (v *MAPSView) AvailableFor(pid int) bool

func (*MAPSView) Drawable

func (v *MAPSView) Drawable() ui.Drawable

func (*MAPSView) Event

func (v *MAPSView) Event(e ui.Event)

func (*MAPSView) Reset

func (v *MAPSView) Reset()

func (*MAPSView) Title

func (v *MAPSView) Title() string

func (*MAPSView) Update

func (v *MAPSView) Update(state *host.State) error

type MEMView

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

func NewMEMView

func NewMEMView() *MEMView

func (*MEMView) AvailableFor

func (v *MEMView) AvailableFor(pid int) bool

func (*MEMView) Drawable

func (v *MEMView) Drawable() ui.Drawable

func (*MEMView) Event

func (v *MEMView) Event(e ui.Event)

func (*MEMView) Reset

func (v *MEMView) Reset()

func (*MEMView) Title

func (v *MEMView) Title() string

func (*MEMView) Update

func (v *MEMView) Update(state *host.State) error

type STACKView

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

func NewSTACKView

func NewSTACKView() *STACKView

func (*STACKView) AvailableFor

func (v *STACKView) AvailableFor(pid int) bool

func (*STACKView) Drawable

func (v *STACKView) Drawable() ui.Drawable

func (*STACKView) Event

func (v *STACKView) Event(e ui.Event)

func (*STACKView) Reset

func (v *STACKView) Reset()

func (*STACKView) Title

func (v *STACKView) Title() string

func (*STACKView) Update

func (v *STACKView) Update(state *host.State) error

type View

type View interface {
	AvailableFor(pid int) bool
	Reset()
	Update(state *host.State) error
	Title() string
	Event(e ui.Event)
	Drawable() ui.Drawable
}

func ByName

func ByName(name string) View

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL