sd

package
v0.0.0-...-6b2b62e Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package api provides APi for chestnut.

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() 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]

func NetCheck

func NetCheck() echo.HandlerFunc

@Summary Checks the net message @Description Checks the net message @Tags sd @Accept json @Produce json @Success 200 {string} plain WLAN BytesSent : 9328315 | BytesRecv : 87317530 | packetsSent : 65301 | packageRecv : 81460 @Router /sd/net [get]

func RAMCheck

func RAMCheck() echo.HandlerFunc

@Summary Checks the ram usage @Description Checks the ram usage @Tags sd @Accept json @Produce json @Success 200 {string} plain "OK - Free space: 402MB (0GB) / 8192MB (8GB) | Used: 4%" @Router /sd/ram [get]

Types

This section is empty.

Jump to

Keyboard shortcuts

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