3 ms·
Maybe tower-request-id is an example of how to implement something like that? https://github.com/imbolc/tower-request-id https://github.com/imbolc/tower-reques
by jamincan 4y ago
Maybe tower-request-id is an example of how to implement something like that?
https://github.com/imbolc/tower-request-id https://github.com/imbolc/tower-request-id
- newaccount2021 4y agoThis is exactly what I am doing, but you shouldn't have to modify the request itself to pass temporary state
- fasterthanlime 4y agoEh, that's definitely a matter of taste. You definitely shouldn't have to pass an additional parameter everywhere you want context there's no absolutes here, just preferences.
- masklinn 4y agoWhy not? Given Rust's semantics it's really no different than how Go's Context seems to be used, just more efficient.