(deps commandDeps)
| 983 | } |
| 984 | |
| 985 | func newMemoryExtractorStatusCommand(deps commandDeps) *cobra.Command { |
| 986 | var sessionID string |
| 987 | |
| 988 | cmd := &cobra.Command{ |
| 989 | Use: memoryStatusKey, |
| 990 | Short: "Show Memory v2 extractor runtime status", |
| 991 | Args: cobra.NoArgs, |
| 992 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 993 | client, err := clientFromDeps(deps) |
| 994 | if err != nil { |
| 995 | return err |
| 996 | } |
| 997 | response, err := client.GetMemoryExtractorStatus(cmd.Context(), sessionID) |
| 998 | if err != nil { |
| 999 | return err |
| 1000 | } |
| 1001 | return writeCommandOutput(cmd, memoryObjectBundle("Memory Extractor Status", response)) |
| 1002 | }, |
| 1003 | } |
| 1004 | cmd.Flags().StringVar(&sessionID, "session", "", "Filter extractor status by session") |
| 1005 | return cmd |
| 1006 | } |
| 1007 | |
| 1008 | func newMemoryExtractorListPendingCommand(deps commandDeps) *cobra.Command { |
| 1009 | return &cobra.Command{ |
no test coverage detected