mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
This is in preparation of using compute_ctl to launch postgres nodes in the neon_local control plane. And seems like a good idea to separate the public interfaces anyway. One non-mechanical change here is that the 'metrics' field is moved under the Mutex, instead of using atomics. We were not using atomics for performance but for convenience here, and it seems more clear to not use atomics in the model for the HTTP response type.
15 lines
485 B
Rust
15 lines
485 B
Rust
//! Structs representing the JSON formats used in the compute_ctl's HTTP API.
|
|
|
|
use crate::spec::ComputeSpec;
|
|
use serde::Deserialize;
|
|
|
|
/// Request of the /configure API
|
|
///
|
|
/// We now pass only `spec` in the configuration request, but later we can
|
|
/// extend it and something like `restart: bool` or something else. So put
|
|
/// `spec` into a struct initially to be more flexible in the future.
|
|
#[derive(Deserialize, Debug)]
|
|
pub struct ConfigurationRequest {
|
|
pub spec: ComputeSpec,
|
|
}
|