serverSessionMethod is glue for creating a typedServerMethodHandler from a method on ServerSession.
(f func(*ServerSession, context.Context, P) (R, error))
| 330 | |
| 331 | // serverSessionMethod is glue for creating a typedServerMethodHandler from a method on ServerSession. |
| 332 | func serverSessionMethod[P Params, R Result](f func(*ServerSession, context.Context, P) (R, error)) typedServerMethodHandler[P, R] { |
| 333 | return func(ctx context.Context, req *ServerRequest[P]) (R, error) { |
| 334 | return f(req.GetSession().(*ServerSession), ctx, req.Params) |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | // clientSessionMethod is glue for creating a typedMethodHandler from a method on ServerSession. |
| 339 | func clientSessionMethod[P Params, R Result](f func(*ClientSession, context.Context, P) (R, error)) typedClientMethodHandler[P, R] { |
no test coverage detected
searching dependent graphs…