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

Function _Echo_UnaryEcho_Handler

examples/features/proto/echo/echo_grpc.pb.go:181–197  ·  view source on GitHub ↗
(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor)

Source from the content-addressed store, hash-verified

179}
180
181func _Echo_UnaryEcho_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
182 in := new(EchoRequest)
183 if err := dec(in); err != nil {
184 return nil, err
185 }
186 if interceptor == nil {
187 return srv.(EchoServer).UnaryEcho(ctx, in)
188 }
189 info := &grpc.UnaryServerInfo{
190 Server: srv,
191 FullMethod: Echo_UnaryEcho_FullMethodName,
192 }
193 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
194 return srv.(EchoServer).UnaryEcho(ctx, req.(*EchoRequest))
195 }
196 return interceptor(ctx, in, info, handler)
197}
198
199func _Echo_ServerStreamingEcho_Handler(srv interface{}, stream grpc.ServerStream) error {
200 m := new(EchoRequest)

Callers

nothing calls this directly

Calls 2

UnaryEchoMethod · 0.65
interceptorStruct · 0.50

Tested by

no test coverage detected