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

Function StreamInterceptor

server.go:506–513  ·  view source on GitHub ↗

StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the server. Only one stream interceptor can be installed.

(i StreamServerInterceptor)

Source from the content-addressed store, hash-verified

504// StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the
505// server. Only one stream interceptor can be installed.
506func StreamInterceptor(i StreamServerInterceptor) ServerOption {
507 return newFuncServerOption(func(o *serverOptions) {
508 if o.streamInt != nil {
509 panic("The stream server interceptor was already set and may not be reset.")
510 }
511 o.streamInt = i
512 })
513}
514
515// ChainStreamInterceptor returns a ServerOption that specifies the chained interceptor
516// for streaming RPCs. The first interceptor will be the outer most,

Callers 4

listenAndServeMethod · 0.92
mainFunction · 0.92
mainFunction · 0.92

Calls 1

newFuncServerOptionFunction · 0.85

Tested by 2

listenAndServeMethod · 0.74