-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a9206b
commit 2b0727c
Showing
11 changed files
with
53 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
[package] | ||
name = "tokio-prometheus-channel-backpressure" | ||
name = "tokio-prometheus-metered-channel" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "Metered tokio channels with Prometheus metrics integration" | ||
authors = ["Francois Garillot <[email protected]>"] | ||
license = "Apache-2.0" | ||
repository = "https://github.com/yourusername/tokio-prometheus-channel-backpressure" | ||
documentation = "https://docs.rs/tokio-prometheus-channel-backpressure" | ||
repository = "https://github.com/huitseeker/tokio-prometheus-metered-channel" | ||
documentation = "https://docs.rs/tokio-prometheus-metered-channel" | ||
readme = "README.md" | ||
keywords = ["tokio", "prometheus", "metrics", "channel", "async"] | ||
categories = ["asynchronous", "development-tools::monitoring", "concurrency"] | ||
categories = ["asynchronous", "development-tools", "concurrency"] | ||
rust-version = "1.65.0" | ||
|
||
[dependencies] | ||
|
@@ -21,3 +21,8 @@ pin-project = "1.1" | |
tracing = "0.1" | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
tracing-futures = "0.2" | ||
|
||
[package.metadata.release] | ||
sign-tag = true | ||
push-remote = "origin" | ||
allow-branch = ["main"] |
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,8 +1,15 @@ | ||
# Tokio Prometheus metered channel | ||
|
||
Add the following to your `Cargo.toml`: | ||
``` | ||
tokio-prometheus-metered=channel = "0.1.0" | ||
``` | ||
|
||
# Metered Bounded Channel | ||
|
||
The metered bounded channel is a specialized threading utility designed to handle communication between threads with an upper limit on capacity while tracking the channel's occupancy through Prometheus metrics. | ||
|
||
## Functionality | ||
- **Bounded Capacity**: This channel ensures that no more than a predefined number of messages are held in the channel at any given time. | ||
- **Backpressure Handling**: When the channel reaches its capacity, any additional attempts to send messages will be blocked, allowing for backpressure management until the channel has available space. | ||
- **Prometheus Integration**: The current occupancy of the channel is exposed as a Prometheus metric, enabling real-time monitoring of how "full" the channel is. | ||
- **Prometheus Integration**: The current occupancy of the channel is exposed as a Prometheus metric, enabling real-time monitoring of how "full" the channel is. |
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,12 +1,10 @@ | ||
sign-commit = true | ||
sign-tag = true | ||
pre-release-commit-message = "chore: Release version {{version}}" | ||
post-release-commit-message = "chore: Development version {{version}}" | ||
tag-message = "Release version {{version}}" | ||
push = true | ||
publish = true | ||
|
||
pre-release-replacements = [ | ||
{file="README.md", search="tokio-prometheus-channel-backpressure = .*", replace="tokio-prometheus-channel-backpressure = \"{{version}}\""}, | ||
{file="README.md", search="tokio-prometheus-metered=channel = .*", replace="tokio-prometheus-metered-channel = \"{{version}}\""}, | ||
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}"}, | ||
] |
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,2 +1,4 @@ | ||
mod channel_tests; | ||
mod metrics_tests; | ||
mod broadcast_tests; | ||
mod watch_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
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