clientSessionMethod is glue for creating a typedMethodHandler from a method on ServerSession.
(f func(*ClientSession, context.Context, P) (R, error))
| 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] { |
| 340 | return func(ctx context.Context, req *ClientRequest[P]) (R, error) { |
| 341 | return f(req.GetSession().(*ClientSession), ctx, req.Params) |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | // MCP-specific error codes. |
| 346 | const ( |
no test coverage detected
searching dependent graphs…