Skip to content

Commit

Permalink
Use lowercase enum names in json representation (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulgb authored Jan 29, 2024
1 parent 346e3f6 commit 499229a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plane/src/types/backend_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{fmt::Display, net::SocketAddr};
use crate::log_types::{BackendAddr, LoggableTime};

#[derive(Clone, Copy, Serialize, Deserialize, Debug, PartialEq, PartialOrd, valuable::Valuable)]
#[serde(rename_all = "lowercase")]
pub enum BackendStatus {
/// The backend has been scheduled to a drone, but has not yet been acknowledged.
/// This status is only assigned by the controller; the drone will never assign it by definition.
Expand Down Expand Up @@ -32,12 +33,14 @@ pub enum BackendStatus {
}

#[derive(Clone, Copy, Serialize, Deserialize, Debug, PartialEq, valuable::Valuable)]
#[serde(rename_all = "lowercase")]
pub enum TerminationKind {
Soft,
Hard,
}

#[derive(Clone, Serialize, Deserialize, Debug, PartialEq, valuable::Valuable)]
#[serde(rename_all = "lowercase")]
pub enum BackendState {
Scheduled,
Loading,
Expand All @@ -62,6 +65,7 @@ pub enum BackendState {
}

#[derive(Clone, Copy, Serialize, Deserialize, Debug, PartialEq, valuable::Valuable)]
#[serde(rename_all = "lowercase")]
pub enum TerminationReason {
Swept,
External,
Expand Down

0 comments on commit 499229a

Please sign in to comment.