Documentation
¶
Overview ¶
Package connectcompat bridges connect-go v1 and v2 for services that serve on v2 while calling other services through v1 clients, such as the SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeOf ¶
CodeOf returns the code of the first connect-go v2 or v1 error in err's chain, or connect.CodeUnknown when there is none. connect.CodeOf does not recognize v1 errors, which v2 handlers receive from v1 clients.
func HTTPHeader ¶
HTTPHeader copies a connect-go v2 header into an http.Header.
func RequestHeader ¶
RequestHeader returns a copy of the request headers of the server call in ctx, or an empty header when ctx carries no call.
func ServerInterceptor ¶
func ServerInterceptor() connect.ServerInterceptor
ServerInterceptor sends handler errors to clients the way connect-go v1 handlers did. connect-go v2 sends a locally created *connect.Error as written but sends any other error, including v1 errors and errors received from a remote v2 service, as a bare code with no message.
Types ¶
This section is empty.