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

Function WithUnaryInterceptor

dialoptions.go:587–591  ·  view source on GitHub ↗

WithUnaryInterceptor returns a DialOption that specifies the interceptor for unary RPCs.

(f UnaryClientInterceptor)

Source from the content-addressed store, hash-verified

585// WithUnaryInterceptor returns a DialOption that specifies the interceptor for
586// unary RPCs.
587func WithUnaryInterceptor(f UnaryClientInterceptor) DialOption {
588 return newFuncDialOption(func(o *dialOptions) {
589 o.unaryInt = f
590 })
591}
592
593// WithChainUnaryInterceptor returns a DialOption that specifies the chained
594// interceptor for unary RPCs. The first interceptor will be the outer most,

Calls 1

newFuncDialOptionFunction · 0.85