Skip to content

Commit 8511087

Browse files
Adapt to HTTP API client 0.33.0
for RabbitMQ 4.1.1 compatibility in one health check command.
1 parent 5dc5b3d commit 8511087

File tree

3 files changed

+27
-19
lines changed

3 files changed

+27
-19
lines changed

Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ reqwest = { version = "0.12.12", features = [
1717
"__rustls",
1818
"rustls-tls-native-roots",
1919
] }
20-
rabbitmq_http_client = { version = "0.32.0", features = [
20+
rabbitmq_http_client = { version = "0.33.0", features = [
2121
"blocking",
2222
"tabled",
2323
] }

src/tables.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,9 @@ pub fn failure_details(error: &HttpClientError) -> Table {
328328
HealthCheckFailureDetails::NoActiveProtocolListener(details) => {
329329
details.reason.clone()
330330
}
331+
HealthCheckFailureDetails::NoActiveProtocolListeners(details) => {
332+
details.reason.clone()
333+
}
331334
};
332335
data.push(RowOfTwo {
333336
key: "reason",
@@ -486,6 +489,7 @@ pub fn health_check_failure(
486489
HealthCheckFailureDetails::NodeIsQuorumCritical(ref details) => details.reason.clone(),
487490
HealthCheckFailureDetails::NoActivePortListener(ref details) => details.reason.clone(),
488491
HealthCheckFailureDetails::NoActiveProtocolListener(ref details) => details.reason.clone(),
492+
HealthCheckFailureDetails::NoActiveProtocolListeners(ref details) => details.reason.clone(),
489493
};
490494
let code_str = format!("{}", status_code);
491495

@@ -535,6 +539,10 @@ pub fn health_check_failure(
535539
details.inactive_protocol.to_string().as_str(),
536540
]);
537541
}
542+
HealthCheckFailureDetails::NoActiveProtocolListeners(details) => tb.push_record([
543+
"inactive protocols",
544+
details.inactive_protocols.join(", ").as_str(),
545+
]),
538546
};
539547

540548
tb.build()

0 commit comments

Comments
 (0)