-
Notifications
You must be signed in to change notification settings - Fork 92
Add support for agent dispatch management #383
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
Conversation
cmd/lk/agent_dispatch.go
Outdated
var ( | ||
AgentDispatchCommands = []*cli.Command{ | ||
{ | ||
Name: "agentdispatch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably discuss the proper name/command hierarchy here, since agentdispatch
may not be clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see nothing wrong with making dispatch
a subcommand of agent
command:
lk agent dispatch create --room my_room --agent-name bot
cmd/lk/agent_dispatch.go
Outdated
Commands: []*cli.Command{ | ||
{ | ||
Name: "create", | ||
Usage: "Create an agent dispatches", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage: "Create an agent dispatches", | |
Usage: "Create an agent dispatch", |
cmd/lk/agent_dispatch.go
Outdated
Flags: []cli.Flag{ | ||
&cli.StringFlag{ | ||
Name: "room", | ||
Usage: "`Name` of the room to create the dispatch in", | ||
Required: true, | ||
}, | ||
&cli.StringFlag{ | ||
Name: "agent-name", | ||
Usage: "`Agent Name` to dispatch the job to", | ||
Required: false, | ||
}, | ||
&cli.StringFlag{ | ||
Name: "metadata", | ||
Usage: "`Metadata` to pass to the agent workers", | ||
Required: false, | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: SHOUTING_CASE for arg names
cmd/lk/agent_dispatch.go
Outdated
var ( | ||
AgentDispatchCommands = []*cli.Command{ | ||
{ | ||
Name: "agentdispatch", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see nothing wrong with making dispatch
a subcommand of agent
command:
lk agent dispatch create --room my_room --agent-name bot
This PR adds support for agent dispatch management through integration with the agent dispatch service.