Help us shape the future of Go! Take the 2026 Go Developer Survey

cliuptime

package
v1.3.104 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package cliuptime cmd/skywire-cli/cliuptime/cliuptime.go c4-vis-cli the discovery-integrated /uptimes endpoints. Each consumer CLI (skywire cli ut {sd,mdisc,tpd}) wires it in with a per-service default URL; filter semantics and output shapes are identical.

Two verbs are provided:

<parent>          — per-day percentage table (textual)
<parent> graph    — shaded-block timeline graph (visual)

Keeping them separate lets the table command stay minimal (just percentages) while the graph command concentrates all the display-mode flags (per-day / single-line / rolling window).

Keep this thin — the HTTP fetch and filter logic live in pkg/uptimestats so the hypervisor UI / RPC layer can eventually render the same data without going through a CLI subprocess.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd

func NewCmd(cfg Config) *cobra.Command

NewCmd returns a configured uptime subcommand plus its `graph` child. Mount it under whichever parent fits the consumer.

Types

type Config

type Config struct {
	// Use is the cobra command verb (e.g. "sd", "mdisc", "tpd").
	Use string
	// DefaultURL is the base URL used when the --url flag is not set.
	DefaultURL string
	// Short / Long help text used for the generated command.
	Short string
	Long  string
}

Config parameterises the subcommands for a specific discovery.

Jump to

Keyboard shortcuts

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