feat: support the specified timeout of rpc methods (#2742)
Co-authored-by: hanzijian <hanzijian@52tt.com> Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
@@ -110,3 +110,8 @@ func DontLogClientContentForMethod(method string) {
|
||||
func SetClientSlowThreshold(threshold time.Duration) {
|
||||
clientinterceptors.SetSlowThreshold(threshold)
|
||||
}
|
||||
|
||||
// WithTimeoutCallOption return a call option with given timeout.
|
||||
func WithTimeoutCallOption(timeout time.Duration) grpc.CallOption {
|
||||
return clientinterceptors.WithTimeoutCallOption(timeout)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user