-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sidecar): load delegations on startup and send them upon registr…
…ation
- Loading branch information
1 parent
4634ff9
commit 3730d28
Showing
15 changed files
with
157 additions
and
63 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
use clap::Parser; | ||
use serde::Deserialize; | ||
|
||
#[derive(Parser, Debug, Clone)] | ||
#[derive(Parser, Debug, Clone, Deserialize)] | ||
pub struct TelemetryOpts { | ||
/// The port on which to expose Prometheus metrics | ||
#[clap(short, long, env = "METRICS_PORT", default_value_t = 3300)] | ||
pub metrics_port: u16, | ||
metrics_port: u16, | ||
#[clap(short, long, env = "DISABLE_METRICS", default_value_t = false)] | ||
pub disable_metrics: bool, | ||
disable_metrics: bool, | ||
} | ||
|
||
impl TelemetryOpts { | ||
/// Get the metrics port if metrics are enabled or None if they are disabled. | ||
pub fn metrics_port(&self) -> Option<u16> { | ||
if self.disable_metrics { | ||
None | ||
} else { | ||
Some(self.metrics_port) | ||
} | ||
} | ||
} |
Oops, something went wrong.