Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化 third_party_request #14

Closed
xinliangnote opened this issue Mar 13, 2021 · 0 comments
Closed

优化 third_party_request #14

xinliangnote opened this issue Mar 13, 2021 · 0 comments

Comments

@xinliangnote
Copy link
Owner

优化 third_party_request

  • third_party_requestrepository 目录移出;
  • 每个方法创建一个 .go 文件,以 DemoGet 为例,创建 demoget.go
    • 方法:DemoGet(name string, opts ...httpclient.Option) (res *demoGetResponse, err error)
    • 设置重试规则:DemoGetRetryVerify(body []byte) (shouldRetry bool)
    • 设置告警规则:DemoGetAlarmVerify(body []byte) (shouldAlarm bool)
    • 设置 Mock 数据:DemoGetMock() (body []byte)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant