Skip to content

Commit

Permalink
actually added default serde tags
Browse files Browse the repository at this point in the history
  • Loading branch information
moreno-michael committed Mar 19, 2024
1 parent 81f617a commit 91a2274
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion crates/ott-common/src/discovery/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use tracing::info;

use super::*;

#[derive(Debug, Clone, Deserialize, Default)]
#[derive(Debug, Clone, Deserialize)]
pub struct DnsDiscoveryConfig {
/// The port that monoliths should be listening on for load balancer connections.
pub service_port: u16,
Expand All @@ -16,6 +16,7 @@ pub struct DnsDiscoveryConfig {
/// The A record to query. If using docker-compose, this should be the service name for the monolith.
pub query: String,
/// The polling mode discovery interval.
#[serde(default)]
#[serde(with = "humantime_serde")]
pub polling_interval: Option<Duration>,
}
Expand Down
4 changes: 3 additions & 1 deletion crates/ott-common/src/discovery/fly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ use tracing::info;

use super::*;

#[derive(Debug, Clone, Deserialize, Default)]
#[derive(Debug, Clone, Deserialize)]
pub struct FlyDiscoveryConfig {
/// The port that monoliths should be listening on for load balancer connections.
pub service_port: u16,
pub fly_app: String,
/// The polling mode discovery interval.
///
#[serde(default)]
#[serde(with = "humantime_serde")]
pub polling_interval: Option<Duration>,
}
Expand Down

0 comments on commit 91a2274

Please sign in to comment.