MCPcopy Create free account
hub / github.com/BWbwchen/MapReduce / _Worker_Map_Handler

Function _Worker_Map_Handler

rpc/worker_grpc.pb.go:129–145  ·  view source on GitHub ↗
(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor)

Source from the content-addressed store, hash-verified

127}
128
129func _Worker_Map_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
130 in := new(MapInfo)
131 if err := dec(in); err != nil {
132 return nil, err
133 }
134 if interceptor == nil {
135 return srv.(WorkerServer).Map(ctx, in)
136 }
137 info := &grpc.UnaryServerInfo{
138 Server: srv,
139 FullMethod: "/Worker/Map",
140 }
141 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
142 return srv.(WorkerServer).Map(ctx, req.(*MapInfo))
143 }
144 return interceptor(ctx, in, info, handler)
145}
146
147func _Worker_Reduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
148 in := new(ReduceInfo)

Callers

nothing calls this directly

Calls 1

MapMethod · 0.65

Tested by

no test coverage detected