-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
restructure files and some docs (#134)
* restructe files and some docs * rename
- Loading branch information
1 parent
a2d7e57
commit 06047b7
Showing
32 changed files
with
289 additions
and
270 deletions.
There are no files selected for viewing
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 was deleted.
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
2 changes: 1 addition & 1 deletion
2
src/extensions/merge_subscription.rs → src/extensions/merge_subscription/mod.rs
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,11 +1,9 @@ | ||
pub mod config; | ||
pub mod extension; | ||
pub mod extensions; | ||
pub mod logger; | ||
pub mod middleware; | ||
pub mod middlewares; | ||
pub mod server; | ||
pub mod utils; | ||
|
||
#[cfg(test)] | ||
mod integration_tests; | ||
mod tests; |
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,27 +1,22 @@ | ||
use opentelemetry::global::shutdown_tracer_provider; | ||
|
||
use subway::{config, logger::enable_logger, server}; | ||
|
||
#[tokio::main] | ||
async fn main() -> anyhow::Result<()> { | ||
let config = match config::read_config() { | ||
// read config from file | ||
let config = match subway::config::read_config() { | ||
Ok(config) => config, | ||
Err(e) => { | ||
return Err(anyhow::anyhow!(e)); | ||
} | ||
}; | ||
|
||
enable_logger(); | ||
|
||
subway::logger::enable_logger(); | ||
tracing::trace!("{:#?}", config); | ||
|
||
let subway_server = server::start_server(config).await?; | ||
let addr = subway_server.addr; | ||
tracing::info!("Server running at {addr}"); | ||
let subway_server = subway::server::build(config).await?; | ||
tracing::info!("Server running at {}", subway_server.addr); | ||
|
||
subway_server.handle.stopped().await; | ||
|
||
shutdown_tracer_provider(); | ||
opentelemetry::global::shutdown_tracer_provider(); | ||
|
||
Ok(()) | ||
} |
Oops, something went wrong.