- refactor platform apis.

This commit is contained in:
gazebo
2018-06-18 11:47:20 +08:00
parent db287fb025
commit 03574f0f9d
7 changed files with 220 additions and 42 deletions

View File

@@ -32,6 +32,11 @@ var (
ErrBusinessCode = errors.New("Business code is not ok")
)
var (
CBErrMsgUnescape = "can not unescape data:%v, data:%v"
CBErrMsgUnmarshal = "can not unmarshal data:%v, data:%v"
)
func AccessPlatformAPIWithRetry(params *AccessPlatformAPIWithRetryParams, handleResponse func(response *http.Response) (int, error)) error {
exceedLimitRetryCount := 0
recoverableErrorRetryCount := 0