Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/update management server #1022

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/cli/manage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ pub struct Manage {
/// The configuration source for a management server.
#[clap(subcommand)]
pub provider: crate::config::Providers,
/// If specified, filters the available gameserver addresses to the one that
/// matches the specified type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that this will update the docs as well, since they are autogenerated - so no need for changes there.

#[clap(long)]
pub address_type: Option<String>,
/// If specified, additionally filters the gameserver address by its ip kind
#[clap(long, requires("address_type"), value_enum, default_value_t=crate::config::AddrKind::Any)]
pub ip_kind: crate::config::AddrKind,
}

impl Manage {
Expand All @@ -69,6 +76,10 @@ impl Manage {
provider: self.provider,
relay_servers: self.relay,
listener,
address_selector: self.address_type.map(|at| crate::config::AddressSelector {
name: at,
kind: self.ip_kind,
}),
}
.run(crate::components::RunArgs {
config,
Expand Down
3 changes: 2 additions & 1 deletion src/components/manage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub struct Manage {
pub relay_servers: Vec<tonic::transport::Endpoint>,
pub provider: Providers,
pub listener: crate::net::TcpListener,
pub address_selector: Option<crate::config::AddressSelector>,
}

impl Manage {
Expand All @@ -48,7 +49,7 @@ impl Manage {
config.clone(),
ready.provider_is_healthy.clone(),
self.locality,
None,
self.address_selector,
false,
);

Expand Down
Loading