feat: Add request start time context key and update middleware

- Introduced a new constant `ContextKeyRequestStartTime` to store the request start time in the context, enhancing request tracking.
- Updated the `Distribute` middleware to set the request start time in the context using the new constant.
- Modified the `GenRelayInfo` function to retrieve the request start time from the context, ensuring accurate timing information is used in relay operations.
This commit is contained in:
CalciumIon
2024-12-23 20:48:10 +08:00
parent 58fac129d6
commit f3f1817aea
3 changed files with 13 additions and 6 deletions

View File

@@ -1 +1,5 @@
package constant
const (
ContextKeyRequestStartTime = "request_start_time"
)