Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8fa91e0

Browse files
committed
renamed context fetcher
1 parent6ac5911 commit8fa91e0

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

‎coderd/httpmw/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (c *RequestLoggerContext) WriteLog(ctx context.Context, status int) {
112112

113113
typelogContextKeystruct{}
114114

115-
funcFromContext(ctx context.Context)*RequestLoggerContext {
115+
funcRequestLoggerFromContext(ctx context.Context)*RequestLoggerContext {
116116
val:=ctx.Value(logContextKey{})
117117
iflogCtx,ok:=val.(*RequestLoggerContext);ok {
118118
returnlogCtx

‎coderd/inboxnotifications.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (api *API) watchInboxNotifications(rw http.ResponseWriter, r *http.Request)
220220
deferencoder.Close(websocket.StatusNormalClosure)
221221

222222
// Log the request immediately instead of after it completes.
223-
httpmw.FromContext(ctx).WriteLog(ctx,http.StatusAccepted)
223+
httpmw.RequestLoggerFromContext(ctx).WriteLog(ctx,http.StatusAccepted)
224224

225225
for {
226226
select {

‎coderd/provisionerjobs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ func (f *logFollower) follow() {
555555
}
556556

557557
// Log the request immediately instead of after it completes.
558-
httpmw.FromContext(f.ctx).WriteLog(f.ctx,http.StatusAccepted)
558+
httpmw.RequestLoggerFromContext(f.ctx).WriteLog(f.ctx,http.StatusAccepted)
559559

560560
// no need to wait if the job is done
561561
iff.complete {

‎coderd/workspaceagents.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ func (api *API) workspaceAgentLogs(rw http.ResponseWriter, r *http.Request) {
556556
defert.Stop()
557557

558558
// Log the request immediately instead of after it completes.
559-
httpmw.FromContext(ctx).WriteLog(ctx,http.StatusAccepted)
559+
httpmw.RequestLoggerFromContext(ctx).WriteLog(ctx,http.StatusAccepted)
560560

561561
gofunc() {
562562
deferfunc() {
@@ -932,7 +932,7 @@ func (api *API) derpMapUpdates(rw http.ResponseWriter, r *http.Request) {
932932
deferencoder.Close(websocket.StatusGoingAway)
933933

934934
// Log the request immediately instead of after it completes.
935-
httpmw.FromContext(ctx).WriteLog(ctx,http.StatusAccepted)
935+
httpmw.RequestLoggerFromContext(ctx).WriteLog(ctx,http.StatusAccepted)
936936

937937
gofunc(ctx context.Context) {
938938
// TODO(mafredri): Is this too frequent? Use separate ping disconnect timeout?
@@ -1322,7 +1322,7 @@ func (api *API) watchWorkspaceAgentMetadata(
13221322
defersendTicker.Stop()
13231323

13241324
// Log the request immediately instead of after it completes.
1325-
httpmw.FromContext(ctx).WriteLog(ctx,http.StatusAccepted)
1325+
httpmw.RequestLoggerFromContext(ctx).WriteLog(ctx,http.StatusAccepted)
13261326

13271327
// Send initial metadata.
13281328
sendMetadata()

‎enterprise/coderd/provisionerdaemons.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func (api *API) provisionerDaemonServe(rw http.ResponseWriter, r *http.Request)
378378
})
379379

380380
// Log the request immediately instead of after it completes.
381-
httpmw.FromContext(ctx).WriteLog(ctx,http.StatusAccepted)
381+
httpmw.RequestLoggerFromContext(ctx).WriteLog(ctx,http.StatusAccepted)
382382

383383
err=server.Serve(ctx,session)
384384
srvCancel()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp