Documentation ¶
Index ¶
- Constants
- Variables
- func CallStack(recoverRes any, topLevelFunctionName string, lastCallstackMethod string, ...) (callStack []string)
- func MakeHTTPBacklogQueueLimiter(downstream http.Handler, gauge gauge, limit uint64, logger *log.Entry) *backlogHTTPQLimiter
- func MakeHTTPRequestDurationLimiter(downstream http.Handler, warningThreshold time.Duration, ...) *httpRequestDurationLimiter
- func MakeJrpcBacklogQueueLimiter(downstream jrpc2.Handler, gauge gauge, limit uint64, logger *log.Entry) *backlogJrpcQLimiter
- func MakeJrpcRequestDurationLimiter(downstream jrpc2.Handler, warningThreshold time.Duration, ...) *rpcRequestDurationLimiter
Constants ¶
View Source
const RequestBacklogQueueNoLimit = maxUint
View Source
const RequestDurationLimiterNoLimit = maxDuration
Variables ¶
View Source
var ErrFailToProcessDueToInternalIssue = jrpc2.Error{
Code: -32003,
Message: "request failed to process due to internal issue",
}
View Source
var ErrRequestExceededProcessingLimitThreshold = jrpc2.Error{
Code: -32001,
Message: "request exceeded processing limit threshold",
}
Functions ¶
func CallStack ¶
func CallStack(recoverRes any, topLevelFunctionName string, lastCallstackMethod string, unwindStackLines int) (callStack []string)
CallStack returns an array of strings representing the current call stack. The method is tuned for the purpose of panic handler, and used as a helper in contructing the list of entries we want to write to the log / stderr / telemetry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.