resource

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package resources provides formatted output helpers for the resources command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSON

func JSON(cmd *cobra.Command, snap sysinfo.Snapshot, alerts []sysinfo.ResourceAlert) error

JSON writes system resource information as formatted JSON to the command's output writer.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • snap: collected system resource snapshot
  • alerts: evaluated resource alerts

Returns:

  • error: Non-nil on JSON encoding failure

func Text

func Text(cmd *cobra.Command, snap sysinfo.Snapshot, alerts []sysinfo.ResourceAlert)

Text formats and prints system resource information as a human-readable table with status indicators and alert summaries.

Parameters:

  • cmd: Cobra command for output. Nil is a no-op.
  • snap: collected system resource snapshot
  • alerts: evaluated resource alerts

Types

This section is empty.

Jump to

Keyboard shortcuts

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