Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SpaceNoteCmd = &cli.Command{ Name: "set-note", Usage: "Set a Note", Description: "Set the runtime note of the space. Allows a note to be written for the space which is shown on the dashboard along with the user entered description.", Arguments: []cli.Argument{ &cli.StringArg{ Name: "note", Usage: "The note text to set", Required: true, }, }, MaxArgs: cli.NoArgs, Run: func(ctx context.Context, cmd *cli.Command) error { noteRequest := agentlink.SpaceNoteRequest{ Note: cmd.GetStringArg("note"), } err := agentlink.SendWithResponseMsg(agentlink.CommandSpaceNote, ¬eRequest, nil) if err != nil { return fmt.Errorf("error setting space note: %w", err) } fmt.Println("Space note set.") return nil }, }
View Source
var SpaceRestartCmd = &cli.Command{ Name: "restart", Usage: "Restart this space", Description: "Restart the space calling this command.", MaxArgs: cli.NoArgs, Run: func(ctx context.Context, cmd *cli.Command) error { err := agentlink.SendWithResponseMsg(agentlink.CommandSpaceRestart, nil, nil) if err != nil { return fmt.Errorf("error requesting space restart: %w", err) } fmt.Println("Restart requested.") return nil }, }
View Source
var SpaceShutdownCmd = &cli.Command{ Name: "shutdown", Usage: "Shutdown this space", Description: "Shutdown the space calling this command.", MaxArgs: cli.NoArgs, Run: func(ctx context.Context, cmd *cli.Command) error { err := agentlink.SendWithResponseMsg(agentlink.CommandSpaceStop, nil, nil) if err != nil { return fmt.Errorf("error requesting space shutdown: %w", err) } fmt.Println("Shutdown requested.") return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.