app

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogWarn = &logrus.Logger{
		Out:       os.Stderr,
		Formatter: new(logrus.TextFormatter),
		Hooks:     make(logrus.LevelHooks),
		Level:     logrus.WarnLevel,
	}
)

Functions

func CPULoad

func CPULoad() []float64

func GetHealth

func GetHealth() int

func GetReadiness

func GetReadiness() int

func IsOSDarwin

func IsOSDarwin() bool

func LogRequest

func LogRequest(r *http.Request)

func ParseDuration added in v0.4.1

func ParseDuration(s string) (time.Duration, error)

Types

type CPUStats

type CPUStats struct {
	Name string
	Load float64
}

func CPUInfo

func CPUInfo() []CPUStats

type Config

type Config struct {
	Port uint64
}

func GetConfig

func GetConfig() Config

type MemStats

type MemStats struct {
	UsedMemory     uint64  `json:"used_memory"`
	TotalMemory    uint64  `json:"total_memory"`
	PercentageUsed float64 `json:"percentage_used"`
}

func MemInfo

func MemInfo() MemStats

type WhoamiInfo

type WhoamiInfo struct {
	Hostname  string
	Addresses map[string][]string
}
var Info WhoamiInfo

Jump to

Keyboard shortcuts

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