MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / RunStatus

Function RunStatus

tui/status.go:762–784  ·  view source on GitHub ↗
(client *api.Client, monitoring bool, instances []api.Instance, verbose bool)

Source from the content-addressed store, hash-verified

760}
761
762func RunStatus(client *api.Client, monitoring bool, instances []api.Instance, verbose bool) error {
763 ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
764 defer stop()
765
766 InitCommonStyles(os.Stdout)
767
768 m := newStatusModel(client, monitoring, instances, verbose)
769 p := tea.NewProgram(
770 m,
771 tea.WithContext(ctx),
772 tea.WithOutput(os.Stdout),
773 )
774
775 if monitoring {
776 disableResizeSignal()
777 }
778
779 if _, err := p.Run(); err != nil {
780 return fmt.Errorf("error running status TUI: %w", err)
781 }
782
783 return nil
784}

Callers 1

RunStatusFunction · 0.92

Calls 3

InitCommonStylesFunction · 0.85
newStatusModelFunction · 0.85
disableResizeSignalFunction · 0.70

Tested by

no test coverage detected