-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add Get command to Kanx #3313
base: master
Are you sure you want to change the base?
add Get command to Kanx #3313
Conversation
Signed-off-by: Aaron Alpar <[email protected]>
df71962
to
71c919a
Compare
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.
Overall looks good, thank you
@@ -1,7 +1,7 @@ | |||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. | |||
// versions: | |||
// - protoc-gen-go-grpc v1.2.0 | |||
// - protoc v3.12.4 | |||
// - protoc-gen-go-grpc v1.5.1 |
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.
Thank you for upgrading this.
rpc ListProcesses (ListProcessesRequest) returns (stream Process) {} | ||
rpc Stdout (ProcessOutputRequest) returns (stream Output) {} | ||
rpc Stderr (ProcessOutputRequest) returns (stream Output) {} | ||
rpc Stdout (ProcessPidRequest) returns (stream Output) {} |
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.
Could you please clarify this Change?
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.
@tdmanv Ah. There are RPC requests in the protocol that take only one argument, the PID. I've simplified these RPC requests by consolidating the Process*Request
to ProcessPidRequest
It leads to a smaller kanx.proto
file, and personally, I think its clearer.
Footnote: it doesn't look like GRPC uses the *Request
structure to qualify the call.
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.
Ah, I understand, thanks
rpc ListProcesses (ListProcessesRequest) returns (stream Process) {} | ||
rpc Stdout (ProcessOutputRequest) returns (stream Output) {} | ||
rpc Stderr (ProcessOutputRequest) returns (stream Output) {} | ||
rpc Stdout (ProcessPidRequest) returns (stream Output) {} |
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.
Ah, I understand, thanks
Change Overview
Add
GetProcess
to kanx client/server.GetProcess
allows retrieval of a single process by PID, instead of only being able to retrieve process information in lists. Implementing this protocol allows for simplifying some code as well as decoupling process summary information provided byListProcesses
and process detail information provided byGetProcess
.This PR also includes some trivial changes for clarity.
Pull request type
Please check the type of change your PR introduces:
Issues
This is not related to a Github issue.
Test Plan
Unit test included, plus existing unit tests have been converted from
ListProcesses
toGetProcess