structs

package
v0.0.0-...-7f4cfb0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SaveOnlyChanges = iota
	SaveFullData
)

Mode

View Source
const (
	CloseEvent = iota
	RefreshConnectionListEvent
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

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

type Connection

type Connection struct {
	// Так как соединение может быть активно долгое время, то для него нет однозначного соответствия id - connection.
	// Поэтому FakeID
	FakeId      int    // id of connection.
	LAddr       []int  // local address
	LPort       int    // local port
	RAddr       []int  // remote address
	RPort       int    // remote port
	Pid         int    // process id
	ProcName    string // process name
	ProcOwner   string // process owner
	ActiveSince time.Time
	ClosedWhen  time.Time
	Status      int
}

type Cpu

type Cpu struct {
	Percentage []float64
	Model      string
	Cores      int
}

type Disk

type Disk struct {
	Total       uint64
	Free        uint64
	Used        uint64
	UsedPercent float64
}

type Event

type Event struct {
	Name  int
	Data  interface{}
	Delay time.Time
}

type Host

type Host struct {
	Id     int
	Name   string
	IP     string
	Status int
}

type HostInfo

type HostInfo struct {
	Procs           uint64
	OS              string
	PlatformVersion string
	Platform        string
}

type Procs

type Procs struct {
	Pid        int32
	Name       string
	Status     string
	ParentPid  int32
	Uids       []int32
	Gids       []int32
	Groups     []int32
	NumThreads int32
	CreateTime int64
}

type Stats

type Stats struct {
	VmStat      VmStat
	Disk        Disk
	Cpu         Cpu
	Host        HostInfo
	Processes   []Procs
	Connections []Connection
	HostTime    time.Time
}

type VmStat

type VmStat struct {
	Total       uint64
	Available   uint64
	Used        uint64
	UsedPercent float64
	Free        uint64
	Active      uint64
	Inactive    uint64
	Wired       uint64
}

Jump to

Keyboard shortcuts

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