(interceptors []UnaryServerInterceptor, curr int, info *UnaryServerInfo, finalHandler UnaryHandler)
| 1249 | } |
| 1250 | |
| 1251 | func getChainUnaryHandler(interceptors []UnaryServerInterceptor, curr int, info *UnaryServerInfo, finalHandler UnaryHandler) UnaryHandler { |
| 1252 | if curr == len(interceptors)-1 { |
| 1253 | return finalHandler |
| 1254 | } |
| 1255 | return func(ctx context.Context, req any) (any, error) { |
| 1256 | return interceptors[curr+1](ctx, req, info, getChainUnaryHandler(interceptors, curr+1, info, finalHandler)) |
| 1257 | } |
| 1258 | } |
| 1259 | |
| 1260 | func (s *Server) processUnaryRPC(ctx context.Context, stream *transport.ServerStream, info *serviceInfo, md *MethodDesc, trInfo *traceInfo) (err error) { |
| 1261 | sh := s.statsHandler |
no outgoing calls
no test coverage detected