server: unify handling of unary and streaming RPCs (#9309)
This change unifies the processing for unary and streaming RPCs on the gRPC-Go server. By treating all RPCs fundamentally as streams internally, this change simplifies the codebase and eliminates duplicate logic. Summary of changes: * Merged `processUnaryRPC` and `processStreamingRPC` into a single `processRPC` method by wrapping unary handlers as stream handlers. * Removed the methods map from `serviceInfo`, storing all descriptors in the streams map. * Ensured interceptor segregation is maintained so that unary interceptors only run for unary RPCs and stream interceptors only run for streaming RPCs. * Introduced thread-safe, exactly-once status writing in `serverStream` using an atomic boolean to prevent duplicate status writes. * Added tests to verify interceptor segregation and concurrent status writing behavior. RELEASE NOTES: none
E
Easwar Swaminathan committed
ec035398ca140ed857ecd151ebc35f9511f32847
Parent: 44332db
Committed by GitHub <noreply@github.com>
on 8/13/2026, 7:38:01 AM