runtime

package
v1.15.21 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info added in v1.10.9

type Info struct {
	Version     string  `json:"version"`
	GoVersion   string  `json:"go_version"`
	OS          string  `json:"os"`
	Arch        string  `json:"arch"`
	CPUCores    int     `json:"cpu_cores"`
	MemoryUsed  uint64  `json:"memory_used"`
	MemoryTotal uint64  `json:"memory_total"`
	DiskUsed    float64 `json:"disk_used"`
	DiskTotal   float64 `json:"disk_total"`
	CurrentTime string  `json:"current_time"`
	RunningAt   string  `json:"running_at"`
}

Info ...

type Runtime

type Runtime interface {
	CurrentTime() *datetime.DateTime
	RunningAt() *datetime.DateTime
	OS() string
	Arch() string
	CPUCores() int
	Memory() (allocated, total uint64)
	Disk() (free, total float64)
	GoVersion() string
	GoRoot() string
	Info() *Info
	Print()
}

Runtime ...

func New

func New(logger *logger.Logger) Runtime

New ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳