ChainUnaryInterceptor returns a ServerOption that specifies the chained interceptor for unary RPCs. The first interceptor will be the outer most, while the last interceptor will be the inner most wrapper around the real call. All unary interceptors added by this method will be chained.
(interceptors ...UnaryServerInterceptor)
| 496 | // while the last interceptor will be the inner most wrapper around the real call. |
| 497 | // All unary interceptors added by this method will be chained. |
| 498 | func ChainUnaryInterceptor(interceptors ...UnaryServerInterceptor) ServerOption { |
| 499 | return newFuncServerOption(func(o *serverOptions) { |
| 500 | o.chainUnaryInts = append(o.chainUnaryInts, interceptors...) |
| 501 | }) |
| 502 | } |
| 503 | |
| 504 | // StreamInterceptor returns a ServerOption that sets the StreamServerInterceptor for the |
| 505 | // server. Only one stream interceptor can be installed. |