mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 09:22:55 +00:00
This includes code that can still read the old V1 format, and convert it to the new ComputeSpecV2 struct. For better test coverage of the upgrade function, update the sample V1 cluster spec file in the tests to match more closely what the control plane actually generates. The intention is to change the real web console to also use the V2 format, and then remove the support for V1 format altogether.
15 lines
505 B
Rust
15 lines
505 B
Rust
//! Structs representing the JSON formats used in the compute_ctl's HTTP API.
|
|
|
|
use crate::spec::ComputeSpecAnyVersion;
|
|
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: ComputeSpecAnyVersion,
|
|
}
|