Rather than depending on generic jsonrpc.Conn, we can provide a Client type with all the built in routes denoted with separate functions and extensible with additional routes too (if possible with type embedding or similar?). This would remove the generic connection functions like ReadReq, WriteResp, etc.
Feasibility of this is debatable.
This also adds clarity (via removing generics) at the cost of verbosity.
Rather than depending on generic
jsonrpc.Conn
, we can provide aClient
type with all the built in routes denoted with separate functions and extensible with additional routes too (if possible with type embedding or similar?). This would remove the generic connection functions likeReadReq
,WriteResp
, etc.Feasibility of this is debatable.
This also adds clarity (via removing generics) at the cost of verbosity.