-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1291: Refactor packages: extract
http-tracker-core
package
8958609 refactor: [#1281] extract http-tracker-core package (Jose Celano) Pull request description: Refactor packages: extract `http-tracker-core` package ACKs for top commit: josecelano: ACK 8958609 Tree-SHA512: 048e7c076f3a21c773c31f3f2770e06685d685a9034c0309e4de3ec9094f64b03a023583fbc6b2d386f4fa50c0704ddceea2cb9b9e25bf957c3d7a55c5a15bb5
- Loading branch information
Showing
29 changed files
with
836 additions
and
119 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
authors.workspace = true | ||
description = "A library with the core functionality needed to implement a BitTorrent HTTP tracker." | ||
documentation.workspace = true | ||
edition.workspace = true | ||
homepage.workspace = true | ||
keywords = ["api", "bittorrent", "core", "library", "tracker"] | ||
license.workspace = true | ||
name = "bittorrent-http-tracker-core" | ||
publish.workspace = true | ||
readme = "README.md" | ||
repository.workspace = true | ||
rust-version.workspace = true | ||
version.workspace = true | ||
|
||
[dependencies] | ||
aquatic_udp_protocol = "0" | ||
bittorrent-http-protocol = { version = "3.0.0-develop", path = "../http-protocol" } | ||
bittorrent-primitives = "0.1.0" | ||
bittorrent-tracker-core = { version = "3.0.0-develop", path = "../tracker-core" } | ||
futures = "0" | ||
tokio = { version = "1", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } | ||
torrust-tracker-configuration = { version = "3.0.0-develop", path = "../configuration" } | ||
torrust-tracker-primitives = { version = "3.0.0-develop", path = "../primitives" } | ||
tracing = "0" | ||
|
||
[dev-dependencies] | ||
mockall = "0" | ||
torrust-tracker-test-helpers = { version = "3.0.0-develop", path = "../test-helpers" } |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# BitTorrent HTTP Tracker Core library | ||
|
||
A library with the core functionality needed to implement a BitTorrent HTTP tracker. | ||
|
||
You usually don’t need to use this library directly. Instead, you should use the [Torrust Tracker](https://github.com/torrust/torrust-tracker). If you want to build your own tracker, you can use this library as the core functionality. | ||
|
||
> **Disclaimer**: This library is actively under development. We’re currently extracting and refining common types from the[Torrust Tracker](https://github.com/torrust/torrust-tracker) to make them available to the BitTorrent community in Rust. While these types are functional, they are not yet ready for use in production or third-party projects. | ||
## Documentation | ||
|
||
[Crate documentation](https://docs.rs/bittorrent-http-tracker-core). | ||
|
||
## License | ||
|
||
The project is licensed under the terms of the [GNU AFFERO GENERAL PUBLIC LICENSE](./LICENSE). |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
pub mod services; | ||
pub mod statistics; | ||
|
||
#[cfg(test)] | ||
pub(crate) mod tests { | ||
use bittorrent_primitives::info_hash::InfoHash; | ||
|
||
/// # Panics | ||
/// | ||
/// Will panic if the string representation of the info hash is not a valid info hash. | ||
#[must_use] | ||
pub fn sample_info_hash() -> InfoHash { | ||
"3b245504cf5f11bbdbe1201cea6a6bf45aee1bc0" // DevSkim: ignore DS173237 | ||
.parse::<InfoHash>() | ||
.expect("String should be a valid info hash") | ||
} | ||
} |
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
File renamed without changes.
Oops, something went wrong.