-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement suspend and resume endpoints of supervisor API #7
Conversation
Opening this one for review. |
supervisor.go
Outdated
var result OutputIngestionSpec | ||
if err != nil { | ||
return result, err | ||
} |
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.
Style/Optional:
- Usually, error handling should come right after the call that returns error.
- I'd say it's usually safer to return explicit zero value in err branches.
(applies to Resume
as well)
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.
fixed
type QueryGranularity struct { | ||
Type string `json:"type,omitempty"` | ||
} |
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.
type QueryGranularity struct { | |
Type string `json:"type,omitempty"` | |
} | |
type QueryGranularity struct { | |
Type string `json:"type,omitempty"` | |
} |
And add a comment please.
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.
Please address @zoido's comments WRT to unmarshalling.
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.
LGTM (I can't approve as PR creator)
var result SupervisorStatus | ||
r, err := s.client.NewRequest("GET", applySupervisorId(supervisorStatusEndpoint, supervisorId), nil) |
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: please consider using http.MethodGet
Co-authored-by: Luboš Pokorný <[email protected]>
This PR is on hold as a work of extended deduplication.
Addresses https://github.com/h2oai/telemetry/issues/167