client: export types implementing CallOptions for access by interceptors (#1902)
This commit is contained in:
committed by
dfawley
parent
ec9275ba9a
commit
fa28bef939
4
call.go
4
call.go
@ -27,6 +27,10 @@ import (
|
||||
//
|
||||
// All errors returned by Invoke are compatible with the status package.
|
||||
func (cc *ClientConn) Invoke(ctx context.Context, method string, args, reply interface{}, opts ...CallOption) error {
|
||||
// allow interceptor to see all applicable call options, which means those
|
||||
// configured as defaults from dial option as well as per-call options
|
||||
opts = append(cc.dopts.callOptions, opts...)
|
||||
|
||||
if cc.dopts.unaryInt != nil {
|
||||
return cc.dopts.unaryInt(ctx, method, args, reply, cc, invoke, opts...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user