MCPcopy
hub / github.com/grpc/grpc-go / _SearchService_Search_Handler

Function _SearchService_Search_Handler

reflection/grpc_testing/test_grpc.pb.go:122–138  ·  view source on GitHub ↗
(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor)

Source from the content-addressed store, hash-verified

120}
121
122func _SearchService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
123 in := new(SearchRequest)
124 if err := dec(in); err != nil {
125 return nil, err
126 }
127 if interceptor == nil {
128 return srv.(SearchServiceServer).Search(ctx, in)
129 }
130 info := &grpc.UnaryServerInfo{
131 Server: srv,
132 FullMethod: SearchService_Search_FullMethodName,
133 }
134 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
135 return srv.(SearchServiceServer).Search(ctx, req.(*SearchRequest))
136 }
137 return interceptor(ctx, in, info, handler)
138}
139
140func _SearchService_StreamingSearch_Handler(srv interface{}, stream grpc.ServerStream) error {
141 return srv.(SearchServiceServer).StreamingSearch(&grpc.GenericServerStream[SearchRequest, SearchResponse]{ServerStream: stream})

Callers

nothing calls this directly

Calls 2

SearchMethod · 0.65
interceptorStruct · 0.50

Tested by

no test coverage detected