mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-13 13:35:59 +08:00
api to rpc
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
type rpcFunc[E, C, D any] func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)
|
||||
|
||||
func New[A, B, C, D any, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] {
|
||||
func New[A, B, C, D, E any](apiReq *A, apiResp *B, rpc func(client E, ctx context.Context, req *C, options ...grpc.CallOption) (*D, error)) RpcCall[A, B, C, D, E] {
|
||||
return &rpcCall[A, B, C, D, E]{
|
||||
apiReq: apiReq,
|
||||
apiResp: apiResp,
|
||||
|
||||
Reference in New Issue
Block a user