status

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = 1
	KB = 1024 * B
	MB = 1024 * KB
	GB = 1024 * MB
)

Variables

This section is empty.

Functions

func CPUCheck

func CPUCheck(c *gin.Context)

func CPUInfo added in v2.1.0

func CPUInfo(c *gin.Context)

func DiskCheck

func DiskCheck(c *gin.Context)

func HealthCheck

func HealthCheck(c *gin.Context)

@Summary /status/health @Description HealthCheck shows OK as the ping-pong result. must of api not use [ BasePath ] @Tags status @Success 200 "OK" @Router /status/health [get] @BasePath /

func RAMCheck

func RAMCheck(c *gin.Context)

Types

type CPU added in v2.1.0

type CPU struct {
	L1  float64 `json:"l_1,omitempty"`
	L5  float64 `json:"l_5,omitempty"`
	L15 float64 `json:"l_15,omitempty"`

	CpuCnt int    `json:"c_cnt,omitempty"`
	Status string `json:"status"`
}

type Disk

type Disk struct {
	Info        string `json:"info,omitempty"`
	UsedMB      int    `json:"used_mb,omitempty"`
	UsedGB      int    `json:"used_gb,omitempty"`
	TotalMB     int    `json:"total_mb,omitempty"`
	TotalGB     int    `json:"total_gb,omitempty"`
	UsedPercent int    `json:"used_percent,omitempty"`
}

type RAM

type RAM struct {
	Info        string `json:"info,omitempty"`
	UsedMB      int    `json:"used_mb,omitempty"`
	UsedGB      int    `json:"used_gb,omitempty"`
	TotalMB     int    `json:"total_mb,omitempty"`
	TotalGB     int    `json:"total_gb,omitempty"`
	UsedPercent int    `json:"used_percent,omitempty"`
}

Jump to

Keyboard shortcuts

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