MCPcopy Create free account
hub / github.com/devfeel/dotweb / DefaultTimeoutHookHandler

Function DefaultTimeoutHookHandler

dotweb.go:723–727  ·  view source on GitHub ↗
(ctx Context)

Source from the content-addressed store, hash-verified

721}
722
723func DefaultTimeoutHookHandler(ctx Context) {
724 realDration := ctx.Items().GetTimeDuration(ItemKeyHandleDuration)
725 logs := fmt.Sprintf("req %v, cost %v", ctx.Request().Url(), realDration.Seconds())
726 ctx.HttpServer().DotApp.Logger().Warn(logs, LogTarget_RequestTimeout)
727}

Callers

nothing calls this directly

Calls 7

UrlMethod · 0.80
GetTimeDurationMethod · 0.65
ItemsMethod · 0.65
RequestMethod · 0.65
WarnMethod · 0.65
HttpServerMethod · 0.65
LoggerMethod · 0.45

Tested by

no test coverage detected