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

Function ChainUnaryInterceptor

server.go:498–502  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
498func 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.

Calls 1

newFuncServerOptionFunction · 0.85