context

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	context.Context

	Config    *config.Config
	Hostname  *Hostname
	Uptime    *Uptime
	Sysinfo   *SysInfo
	Zpool     *Zpool
	DiskSpace *DiskSpace
	Docker    *Docker
	Smart     *Smart
	Systemd   *Systemd
	Plex      *Plex
	// contains filtered or unexported fields
}

func New

func New() *Context

func (*Context) Cancel

func (c *Context) Cancel()

type Disk added in v0.2.0

type Disk struct {
	Mountpoint string
	Total      uint64
	Used       uint64
}

type DiskInfo

type DiskInfo struct {
	Name        string
	Type        DiskType
	Temperature uint64
	HasError    bool
}

type DiskSpace added in v0.2.0

type DiskSpace struct {
	Disks []Disk
}

type DiskType

type DiskType string
const (
	DiskTypeHDD  DiskType = "hdd"
	DiskTypeSSD  DiskType = "ssd"
	DiskTypeNVMe DiskType = "nvme"
)

type Docker

type Docker struct {
	Containers []DockerContainer
}

type DockerContainer

type DockerContainer struct {
	Name    string
	State   string
	Healthy bool
}

type Hostname

type Hostname struct {
	Hostname string
}

type LoadInfo

type LoadInfo struct {
	Load1, Load5, Load15 float64
}

type Plex

type Plex struct {
	Sessions int
}

type Smart

type Smart struct {
	Disks []DiskInfo
}

type SysInfo

type SysInfo struct {
	Uptime      time.Duration
	Platform    string
	Kernel      string
	CPU         string
	CPUCount    int
	Load        *LoadInfo
	RootProcs   int
	UserProcs   int
	MemoryTotal uint64
	MemoryUsed  uint64
	MemoryFree  uint64
}

type Systemd

type Systemd struct {
	Units []SystemdUnit
}

type SystemdUnit

type SystemdUnit struct {
	Name        string
	ActiveState string
}

type Uptime

type Uptime struct {
	Uptime time.Duration
}

type Zpool

type Zpool struct {
	Pools []ZpoolPool
}

type ZpoolPool

type ZpoolPool struct {
	Name      string
	Health    string
	Capacity  uint64
	Free      uint64
	Allocated uint64
}

Jump to

Keyboard shortcuts

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