Documentation
¶
Index ¶
Constants ¶
View Source
const (
// StatusClientClosedRequest is the status code for when a client request cancellation of a http request
StatusClientClosedRequest = 499
)
Variables ¶
This section is empty.
Functions ¶
func RespondError ¶
func RespondError(logger log.Logger, w http.ResponseWriter, errorType v1.ErrorType, msg string, statusCode int)
RespondError writes error in Prometheus response format using provided error type and message.
func RespondFromGRPCError ¶
func RespondFromGRPCError(logger log.Logger, w http.ResponseWriter, err error)
RespondFromGRPCError writes gRPC error in Prometheus response format. If error is not a valid gRPC error, use server_error instead.
Types ¶
Click to show internal directories.
Click to hide internal directories.