-
Notifications
You must be signed in to change notification settings - Fork 40
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 HTTP API to Plane controller #434
Add HTTP API to Plane controller #434
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
controller/src/http_server.rs
Outdated
cluster: ClusterName, | ||
image: String, | ||
) -> Result<ScheduleRequest> { | ||
let max_idle_secs = Duration::from_secs(self.grace_period_seconds.unwrap_or_else(|| 600)); |
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.
unwrap_or should be fine here, also would be good to put this in a const at the the top of the file.
controller/src/http_server.rs
Outdated
|
||
impl HttpSpawnRequest { | ||
pub fn into_spawn_request( | ||
&self, |
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.
either call this as_* (is that what it wants?) or silence the clippy complaint by turning off wrong_self_convention
controller/src/http_server.rs
Outdated
let service = server_state | ||
.services | ||
.get(&service) | ||
.ok_or_else(|| StatusCode::NOT_FOUND)?; |
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.
should be fine to use ok_or here too
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.
Some clippy stuff, looks great otherwise!
This implements an HTTP API that is a subset of the NATS API. It aims for compatibility with jamsocket.com, so that jamsocket users can test locally with Plane.