Documentation ¶
Index ¶
- func CodeToHTTP(code connect.Code) int32
- func HTTPToCode(httpCode int32) connect.Code
- func HandleUnary[Req any, Res any](ctx context.Context, req *httpgrpc.HTTPRequest, u UnaryHandler[Req, Res]) (*httpgrpc.HTTPResponse, error)
- func RoundTripUnary[Req any, Res any](rt GRPCRoundTripper, ctx context.Context, in *connect.Request[Req]) (*connect.Response[Res], error)
- type GRPCHandler
- type GRPCRoundTripper
- type UnaryHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodeToHTTP ¶
func CodeToHTTP(code connect.Code) int32
func HTTPToCode ¶
func HTTPToCode(httpCode int32) connect.Code
func HandleUnary ¶
func HandleUnary[Req any, Res any](ctx context.Context, req *httpgrpc.HTTPRequest, u UnaryHandler[Req, Res]) (*httpgrpc.HTTPResponse, error)
func RoundTripUnary ¶
Types ¶
type GRPCHandler ¶
type GRPCHandler interface {
Handle(ctx context.Context, req *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
}
type GRPCRoundTripper ¶
type GRPCRoundTripper interface {
RoundTripGRPC(ctx context.Context, req *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
}
Click to show internal directories.
Click to hide internal directories.