Add grpc retry (#1160)
* Add grpc retry * Update grpc retry * Add tests * Fix a bug * Add api && some tests * Add comment * Add double check * Add server retry quota * Update optimize code * Fix bug * Update optimize code * Update optimize code * Fix bug
This commit is contained in:
@@ -18,6 +18,7 @@ type (
|
||||
// setting 0 means no timeout
|
||||
Timeout int64 `json:",default=2000"`
|
||||
CpuThreshold int64 `json:",default=900,range=[0:1000]"`
|
||||
MaxRetries int `json:",range=[0:]"`
|
||||
}
|
||||
|
||||
// A RpcClientConf is a rpc client config.
|
||||
@@ -27,6 +28,7 @@ type (
|
||||
Target string `json:",optional"`
|
||||
App string `json:",optional"`
|
||||
Token string `json:",optional"`
|
||||
Retry bool `json:",optional"` // grpc auto retry
|
||||
Timeout int64 `json:",default=2000"`
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user