Documentation
¶
Overview ¶
Package api provides APi for chestnut.
Index ¶
Constants ¶
const ( B = 1 KB = 1024 * B MB = 1024 * KB GB = 1024 * MB )
Variables ¶
This section is empty.
Functions ¶
func CPUCheck ¶
func CPUCheck() echo.HandlerFunc
@Summary Checks the cpu usage @Description Checks the cpu usage @Tags sd @Accept json @Produce json @Success 200 {string} plain "CRITICAL - Load average: 1.78, 1.99, 2.02 | Cores: 2" @Router /sd/cpu [get]
func DiskCheck ¶
func DiskCheck() echo.HandlerFunc
@Summary Checks the disk usage @Description Checks the disk usage @Tags sd @Accept json @Produce json @Success 200 {string} plain "OK - Free space: 17233MB (16GB) / 51200MB (50GB) | Used: 33%" @Router /sd/disk [get]
func HealthCheck ¶
func HealthCheck() echo.HandlerFunc
@Summary Shows OK as the ping-pong result @Description Shows OK as the ping-pong result @Tags sd @Accept json @Produce json @Success 200 {string} plain "OK" @Router /sd/health [get]
func HostCheck ¶
func HostCheck() echo.HandlerFunc
@Summary Checks the host message @Description Checks the host message @Tags sd @Accept json @Produce json @Success 200 {string} plain hostname : LAPTOP | Platform : Microsoft Windows 10 Home China | KernelArch : x86_64 @Router /sd/host [get]
Types ¶
This section is empty.