-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 优化uuid转uint63的实现方式(使用Int对象代替js代码) * 调整访问上游的session关键字(用于上游连接共享) * 增加fgw_http_status指标 * metrics增加上游健康检查状态
- Loading branch information
Showing
5 changed files
with
130 additions
and
17 deletions.
There are no files selected for viewing
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,14 +1,34 @@ | ||
pipy() | ||
(( | ||
{ | ||
metrics, | ||
metricsCache, | ||
durationCache, | ||
} = pipy.solve('lib/metrics.js'), | ||
) => pipy() | ||
|
||
.export('http', { | ||
__http: null, | ||
}) | ||
|
||
.pipeline() | ||
.handleStreamStart( | ||
() => ( | ||
metrics.fgwHttpCurrentConnections.withLabels('accepted').increase(), | ||
metrics.fgwHttpCurrentConnections.withLabels('active').increase() | ||
) | ||
) | ||
.handleStreamEnd( | ||
() => ( | ||
metrics.fgwHttpCurrentConnections.withLabels('handled').increase(), | ||
metrics.fgwHttpCurrentConnections.withLabels('active').decrease() | ||
) | ||
) | ||
.demuxHTTP().to( | ||
$=>$ | ||
.handleMessageStart( | ||
msg => (__http = msg?.head) | ||
) | ||
.chain() | ||
) | ||
) | ||
|
||
)() |
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