Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ClientClosed is non-standard http status code, // which defined by nginx. // https://httpstatus.in/499/ ClientClosed = 499 )
Variables ¶
This section is empty.
Functions ¶
func FromGRPCCode ¶
FromGRPCCode converts a gRPC error code into the corresponding HTTP response status.
func ToGRPCCode ¶
ToGRPCCode converts an HTTP error code into the corresponding gRPC response status.
Types ¶
type Converter ¶
type Converter interface { // ToGRPCCode converts an HTTP error code into the corresponding gRPC response status. ToGRPCCode(code int) codes.Code // FromGRPCCode converts a gRPC error code into the corresponding HTTP response status. FromGRPCCode(code codes.Code) int }
var DefaultConverter Converter = statusConverter{}
Click to show internal directories.
Click to hide internal directories.