(deps commandDeps)
| 731 | } |
| 732 | |
| 733 | func newSessionHealthCommand(deps commandDeps) *cobra.Command { |
| 734 | cmd := &cobra.Command{ |
| 735 | Use: "health <session-id>", |
| 736 | Short: "Read session health and wake eligibility", |
| 737 | Example: " agh session health sess_123 --json", |
| 738 | Args: exactOneNonBlankArg(), |
| 739 | RunE: func(cmd *cobra.Command, args []string) error { |
| 740 | client, err := clientFromDeps(deps) |
| 741 | if err != nil { |
| 742 | return err |
| 743 | } |
| 744 | record, err := client.GetSessionHealth(cmd.Context(), args[0]) |
| 745 | if err != nil { |
| 746 | return err |
| 747 | } |
| 748 | return writeCommandOutput(cmd, sessionHealthBundle(record)) |
| 749 | }, |
| 750 | } |
| 751 | return cmd |
| 752 | } |
| 753 | |
| 754 | func newSessionInspectCommand(deps commandDeps) *cobra.Command { |
| 755 | var includeEvents bool |
no test coverage detected