server

package
v0.0.0-...-96f9553 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(address string)

Start initializes the HTTP server and metrics endpoint.

Types

type Metric

type Metric struct {
	Timestamp   time.Time `json:"timestamp"`
	CPUUsage    float64   `json:"cpu_usage"`
	MemoryUsage float64   `json:"memory_usage"`
}

Metric represents a single metric entry.

func LoadMetrics

func LoadMetrics() ([]Metric, error)

LoadMetrics loads metrics from the JSON file, where each line is a separate JSON object.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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