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

feat(iacExtInfo): [116337119] Adjusting the client structure #2544

Closed
wants to merge 48 commits into from

Conversation

SevenEarth
Copy link
Collaborator

feat/iacExtInfo2

@SevenEarth SevenEarth changed the title [WIP] feat/iacExtInfo2 [WIP] feat(iacExtInfo2): [116337119] Adjusting the client structure Mar 11, 2024
@SevenEarth SevenEarth changed the title [WIP] feat(iacExtInfo2): [116337119] Adjusting the client structure feat(iacExtInfo): [116337119] Adjusting the client structure Mar 11, 2024
@SevenEarth SevenEarth added the run check run check label Mar 11, 2024
@SevenEarth SevenEarth added run check run check and removed run check run check labels Mar 11, 2024
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/client: Adjusting the client structure
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 changelog 去掉吧

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删除

@@ -295,14 +295,28 @@ func (me *TencentCloudClient) UseTencentCosClient(bucket string) *cos.Client {
}

// UseMysqlClient returns mysql(cdb) client for service
func (me *TencentCloudClient) UseMysqlClient() *cdb.Client {
func (me *TencentCloudClient) UseMysqlClient(iacExtInfo ...IacExtInfo) *cdb.Client {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥需要使用可变类型的参数呢

iacExtInfoStr = ReqClient
}

request.Header.Set("X-TC-RequestClient", iacExtInfoStr)
Copy link
Collaborator

@andrew-tx andrew-tx Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥要把 extinfo 塞给 "X-TC-RequestClient" 请求头呢,不应该是把 ReqClient 塞给 "X-TC-RequestClient" 吗

if me.wafConn != nil {
if len(iacExtInfo) != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥这段代码要写 2 次

return me.wafConn
}

cpf := me.NewClientProfile(300)
cpf.Language = "zh-CN"
me.wafConn, _ = waf.NewClient(me.Credential, me.Region, cpf)
me.wafConn.WithHttpTransport(&LogRoundTripper{})
if len(iacExtInfo) != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该只需要重新对 LogRoundTripper 赋值就行吧,me.wafConn.WithHttpTransport 的逻辑不用改吧

tongyiming and others added 26 commits March 25, 2024 23:06
* vod update

* add changelog && update doc

* update

* update

* update

* update review_audio_video_task

* update

* update

* update

---------

Co-authored-by: mikatong <[email protected]>
* add eni ipv6

* add eni ipv6

* update doc

* update doc

* add test

* add changelog
* add eni ipv4

* add eni ipv4

* add changelog
* support event config

* add changelog

---------

Co-authored-by: mikatong <[email protected]>
* Field cluster_subnet_id supports ForceNew

* add changelog 2578.txt
* vod update

* add changelog

---------

Co-authored-by: mikatong <[email protected]>
* fix(mariadb): [116318703] support ip port

* feat: add change log

* fix: modify test
* feat(tse): [115375235] support tse network access_control

* feat: add change log

* fix: modify test

* fix: modify test
@SevenEarth SevenEarth closed this Apr 11, 2024
@andrew-tx andrew-tx deleted the feat/iacExtInfo2 branch April 12, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run check run check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants