Documentation ¶
Index ¶
- Constants
- func CustomHTTPErrorHandler(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, ...)
- func GetGlobalMiddlewareDialOptions() []grpc.DialOption
- func GetGlobalServeMuxOptions() []runtime.ServeMuxOption
- func GetGrpcGatewayMux(ctx context.Context) (ggMux *runtime.ServeMux, err error)
- func HttpResponseModifier(ctx context.Context, w http.ResponseWriter, p proto.Message) error
- func IncomingHeaderMatcher(key string) (string, bool)
- func OutgoingHeaderMatcher(key string) (string, bool)
Constants ¶
View Source
const HttpMethodKey = "ffx-http-method"
View Source
const HttpRequestUriKey = "ffx-http-request-uri"
View Source
const XHeaderPrefix = "X-"
Variables ¶
This section is empty.
Functions ¶
func CustomHTTPErrorHandler ¶
func CustomHTTPErrorHandler(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, w http.ResponseWriter, r *http.Request, err error)
CustomHTTPErrorHandler is the default error handler. 参考 https://github.com/grpc-ecosystem/grpc-gateway/blob/main/runtime/errors.go CustomHTTPErrorHandler
func GetGlobalMiddlewareDialOptions ¶
func GetGlobalMiddlewareDialOptions() []grpc.DialOption
GetGlobalMiddlewareDialOptions 获取grpc client 全局中间件选项
func GetGlobalServeMuxOptions ¶
func GetGlobalServeMuxOptions() []runtime.ServeMuxOption
GetGlobalServeMuxOptions 获取全局mux选项
func GetGrpcGatewayMux ¶
func HttpResponseModifier ¶
HttpResponseModifier http响应重写
func IncomingHeaderMatcher ¶
func OutgoingHeaderMatcher ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.