Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
f1aafbc0
Commit
f1aafbc0
authored
Feb 03, 2026
by
song
Browse files
chore: gofmt
parent
7cb5444d
Changes
3
Hide whitespace changes
Inline
Side-by-side
backend/internal/handler/gateway_handler.go
View file @
f1aafbc0
...
@@ -596,6 +596,7 @@ func cloneAPIKeyWithGroup(apiKey *service.APIKey, group *service.Group) *service
...
@@ -596,6 +596,7 @@ func cloneAPIKeyWithGroup(apiKey *service.APIKey, group *service.Group) *service
cloned
.
Group
=
group
cloned
.
Group
=
group
return
&
cloned
return
&
cloned
}
}
// Usage handles getting account balance and usage statistics for CC Switch integration
// Usage handles getting account balance and usage statistics for CC Switch integration
// GET /v1/usage
// GET /v1/usage
func
(
h
*
GatewayHandler
)
Usage
(
c
*
gin
.
Context
)
{
func
(
h
*
GatewayHandler
)
Usage
(
c
*
gin
.
Context
)
{
...
...
backend/internal/pkg/antigravity/oauth.go
View file @
f1aafbc0
...
@@ -81,6 +81,7 @@ func ForwardBaseURLs() []string {
...
@@ -81,6 +81,7 @@ func ForwardBaseURLs() []string {
}
}
return
reordered
return
reordered
}
}
// URLAvailability 管理 URL 可用性状态(带 TTL 自动恢复和动态优先级)
// URLAvailability 管理 URL 可用性状态(带 TTL 自动恢复和动态优先级)
type
URLAvailability
struct
{
type
URLAvailability
struct
{
mu
sync
.
RWMutex
mu
sync
.
RWMutex
...
...
backend/internal/service/ops_metrics_collector.go
View file @
f1aafbc0
...
@@ -314,10 +314,10 @@ func (c *OpsMetricsCollector) collectAndPersist(ctx context.Context) error {
...
@@ -314,10 +314,10 @@ func (c *OpsMetricsCollector) collectAndPersist(ctx context.Context) error {
Upstream429Count
:
upstream429
,
Upstream429Count
:
upstream429
,
Upstream529Count
:
upstream529
,
Upstream529Count
:
upstream529
,
TokenConsumed
:
tokenConsumed
,
TokenConsumed
:
tokenConsumed
,
AccountSwitchCount
:
accountSwitchCount
,
AccountSwitchCount
:
accountSwitchCount
,
QPS
:
float64Ptr
(
roundTo1DP
(
qps
)),
QPS
:
float64Ptr
(
roundTo1DP
(
qps
)),
TPS
:
float64Ptr
(
roundTo1DP
(
tps
)),
TPS
:
float64Ptr
(
roundTo1DP
(
tps
)),
DurationP50Ms
:
duration
.
p50
,
DurationP50Ms
:
duration
.
p50
,
DurationP90Ms
:
duration
.
p90
,
DurationP90Ms
:
duration
.
p90
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment