StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the server. Only one stream interceptor can be installed.
(i StreamServerInterceptor)
| 504 | // StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the |
| 505 | // server. Only one stream interceptor can be installed. |
| 506 | func 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, |