Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
luizfonseca committed Jan 4, 2025
1 parent bb52d17 commit 5de49ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/proksi/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ impl Default for AutoReload {
}

#[derive(Debug, Serialize, Deserialize, Parser)]
pub struct ServerConfig {
pub struct ServerCfg {
/// The address to bind the HTTPS server to.
#[arg(
long = "server.https_address",
Expand Down Expand Up @@ -557,7 +557,7 @@ pub(crate) struct Config {
pub service_name: Cow<'static, str>,

#[command(flatten)]
pub server: ServerConfig,
pub server: ServerCfg,

/// Runs the service in the background (daemon mode)
#[clap(short, long, default_value = "false")]
Expand Down Expand Up @@ -612,7 +612,7 @@ impl Default for Config {
Config {
config_path: Cow::Borrowed("/etc/proksi/config"),
service_name: Cow::Borrowed("proksi"),
server: ServerConfig {
server: ServerCfg {
https_address: Some(Cow::Borrowed("0.0.0.0:443")),
http_address: Some(Cow::Borrowed("0.0.0.0:80")),
},
Expand Down
6 changes: 3 additions & 3 deletions crates/proksi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn main() -> Result<(), anyhow::Error> {
.https_address
.clone()
.unwrap_or_default();
let http_address = proxy_config.server.http_address.clone().unwrap_or_default();
let le_address = proxy_config.server.http_address.clone().unwrap_or_default();

// Logging channel
let (log_sender, log_receiver) = tokio::sync::mpsc::unbounded_channel::<Vec<u8>>();
Expand Down Expand Up @@ -124,7 +124,7 @@ fn main() -> Result<(), anyhow::Error> {
// The router will also handle health checks and failover in case of upstream failure
let router = proxy_server::https_proxy::Router {};
let mut https_secure_service = http_proxy_service(&pingora_server.configuration, router);
http_public_service.add_tcp(&http_address);
http_public_service.add_tcp(&le_address);

// Worker threads per configuration
https_secure_service.threads = proxy_config.worker_threads;
Expand Down Expand Up @@ -163,7 +163,7 @@ fn main() -> Result<(), anyhow::Error> {

let server_info = format!(
"running HTTPS service on {} and HTTP service on {}",
&http_address, &https_address
&https_address, &le_address
);
tracing::info!(
version = crate_version!(),
Expand Down

0 comments on commit 5de49ba

Please # to comment.