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 FetchEntries ¶
func FetchEntries(flags *pflag.FlagSet, baseURL, version string, visors []string, cacheDir string, cacheAge int) ([]uptimestats.VisorSummary, error)
FetchEntries builds the /uptimes URL and hands it off to clirpc.FetchCachedServiceURL so we share the RPC → DMSG → HTTP fallback chain + disk cache with every other uptime-consuming CLI command. Never use uptimestats.Client.VisorUptimes from CLI — it bypasses the cache and can trip the deployment services' rate limits when users iterate on flag combos.
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.