Logo
Explore Help
Register Sign In
oadmin/new-api
1
0
Fork 0
You've already forked new-api
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
6acc37cf2737cbbf802fcbffb3ed6f37e423e9c2
new-api/constant/context_key.go

6 lines
79 B
Go
Raw Normal View History

feat: Introduce settings package and refactor constants - Added a new `setting` package to replace the `constant` package for configuration management, improving code organization and clarity. - Moved various configuration variables such as `ServerAddress`, `PayAddress`, and `SensitiveWords` to the new `setting` package. - Updated references throughout the codebase to use the new `setting` package, ensuring consistent access to configuration values. - Introduced new files for managing chat settings and midjourney settings, enhancing modularity and maintainability of the code.
2024-12-22 17:24:29 +08:00
package constant
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.
2024-12-23 20:48:10 +08:00
const (
ContextKeyRequestStartTime = "request_start_time"
)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 24.7.0 Page: 463ms Template: 13ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API