serverMethod is glue for creating a typedMethodHandler from a method on Server.
( f func(*Server, context.Context, *ServerRequest[P]) (R, error), )
| 312 | |
| 313 | // serverMethod is glue for creating a typedMethodHandler from a method on Server. |
| 314 | func serverMethod[P Params, R Result]( |
| 315 | f func(*Server, context.Context, *ServerRequest[P]) (R, error), |
| 316 | ) typedServerMethodHandler[P, R] { |
| 317 | return func(ctx context.Context, req *ServerRequest[P]) (R, error) { |
| 318 | return f(req.Session.server, ctx, req) |
| 319 | } |
| 320 | } |
| 321 | |
| 322 | // clientMethod is glue for creating a typedMethodHandler from a method on Client. |
| 323 | func clientMethod[P Params, R Result]( |
no outgoing calls
no test coverage detected
searching dependent graphs…