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

Function getChainStreamHandler

server.go:1581–1588  ·  view source on GitHub ↗
(interceptors []StreamServerInterceptor, curr int, info *StreamServerInfo, finalHandler StreamHandler)

Source from the content-addressed store, hash-verified

1579}
1580
1581func getChainStreamHandler(interceptors []StreamServerInterceptor, curr int, info *StreamServerInfo, finalHandler StreamHandler) StreamHandler {
1582 if curr == len(interceptors)-1 {
1583 return finalHandler
1584 }
1585 return func(srv any, stream ServerStream) error {
1586 return interceptors[curr+1](srv, stream, info, getChainStreamHandler(interceptors, curr+1, info, finalHandler))
1587 }
1588}
1589
1590func (s *Server) processStreamingRPC(ctx context.Context, stream *transport.ServerStream, info *serviceInfo, sd *StreamDesc, trInfo *traceInfo) (err error) {
1591 if channelz.IsOn() {

Callers 1

chainStreamInterceptorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected