flx

package
v0.0.0-...-4e1bcef Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMachines

func AllMachines(search string)

func NewSftpClient

func NewSftpClient(h *model.Machine) (*sftp.Client, error)

func NewSshClient

func NewSshClient(h *model.Machine) (*ssh.Client, error)

func RunProxy

func RunProxy(h *model.Machine, localAddr, remoteAddr string) error

func RunSocksProxy

func RunSocksProxy(h *model.Machine, port int) error

func RunSshTerminal

func RunSshTerminal(h *model.Machine, sudoMode bool) error

func ScpLR

func ScpLR(h *model.Machine, localPath, remotePath string) error

func ScpRL

func ScpRL(h *model.Machine, remotePath, localPath string) error

func ShowHardwareInfo

func ShowHardwareInfo(mac *model.Machine) error

Types

type CPUInfo

type CPUInfo struct {
	User    float32
	Nice    float32
	System  float32
	Idle    float32
	Iowait  float32
	Irq     float32
	SoftIrq float32
	Steal   float32
	Guest   float32
}

type FSInfo

type FSInfo struct {
	MountPoint string
	Used       uint64
	Free       uint64
}

type NetIntfInfo

type NetIntfInfo struct {
	IPv4 string
	IPv6 string
	Rx   uint64
	Tx   uint64
}

type SSHTerminal

type SSHTerminal struct {
	Session *ssh.Session

	Password           string
	LoginUser          string
	EnableSudoPassword bool
	// contains filtered or unexported fields
}

type Stats

type Stats struct {
	Uptime       time.Duration
	Hostname     string
	Load1        string
	Load5        string
	Load10       string
	RunningProcs string
	TotalProcs   string
	MemTotal     uint64
	MemFree      uint64
	MemBuffers   uint64
	MemCached    uint64
	SwapTotal    uint64
	SwapFree     uint64
	FSInfos      []FSInfo
	NetIntf      map[string]NetIntfInfo
	CPU          CPUInfo // or []CPUInfo to get all the cpu-core's stats?
	OsInfo       string
}

func FetchHardwareInfo

func FetchHardwareInfo(mc *model.Machine) (*Stats, error)

Jump to

Keyboard shortcuts

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