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

【GoSDK】支持使用 SDKConfig 传入自定义的 HTTP Client,以 满足 MLT 的需求 #373

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

hidu
Copy link
Contributor

@hidu hidu commented Jun 19, 2024

SDKConfig 新增一个可选属性 HTTPClient,当不传入该值的时候,会使用默认Client(和原来保持一致)。

在此之前,SDK 是直接使用标准库的 *http.Client, 在发送请求的时候,如果使用 SDK 的用户想要打印访问日志,统计可用性、添加 Trace 等是没法做到的。
若用户有 Log、Metrics、Trace 等需求,只需要传入自定义的 Client,通过此自定义 Client 实现这些额外的功能。

@hidu hidu changed the title 支持使用 SDKConfig 传入自定义的 HTTP Client,以 满足 MLT 的需求 【GoSDK】支持使用 SDKConfig 传入自定义的 HTTP Client,以 满足 MLT 的需求 Jun 19, 2024
@MrChengmo
Copy link
Collaborator

麻烦老师解决一下代码冲突,其他部分没有问题

@hidu
Copy link
Contributor Author

hidu commented Jun 19, 2024

麻烦老师解决一下代码冲突,其他部分没有问题

done

@MrChengmo MrChengmo merged commit d00b0ee into baidubce:master Jun 20, 2024
2 of 3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants