Skip to content

Conversation

@wolfbolin
Copy link
Contributor

This is just a draft. I think there still needs to be a discussion about how the Config class is written.

@wolfbolin
Copy link
Contributor Author

I would like to add a NetworkConfig class, like AuthConfig , for configuring TLS, GZIP, number of connections, etc. However, the change causes the existing configuration to be unavailable.

Is this a reasonable and acceptable change?

@hezhangjian
Copy link
Member

hezhangjian commented Jul 19, 2024

First, I agree to make MaxConnsPerHost configurable.
Second, we haven't release 1.0.0 version yet, any reasonable change is acceptable.
But, I still have concerns about NetworkConfig's name, gunzip in NetworkConfig seems werid. I was thinking about TransportConfig, but we only support http now, and host, port is in the top field(Config). HttpConfig also feels werid. cc @weiping-code @xuthus5 @Chenxulin97 @cyruslo

@hezhangjian
Copy link
Member

hezhangjian commented Jul 28, 2024

Let's add MaxConnsPerHost and MaxIdleConnsPerHost in to configuration first to solve #90.
For configration refactor, I think we can open a new thread.

}).DialContext,
},
}
return &http.Client{
Copy link
Member

Choose a reason for hiding this comment

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

Nice patch! the if clause is no-needed

@hezhangjian hezhangjian marked this pull request as ready for review July 28, 2024 14:33
@hezhangjian hezhangjian changed the title fix: http client config change (#90)(#85) feat: allow user config MaxConnsPerHost (#90)(#85) Jul 28, 2024
@hezhangjian hezhangjian changed the title feat: allow user config MaxConnsPerHost (#90)(#85) feat: allow user config MaxConnsPerHost (#90) Jul 28, 2024
…Gemini#90)

Signed-off-by: WolfBolin <[email protected]>
Signed-off-by: ZhangJian He <[email protected]>
Co-authored-by: ZhangJian He <[email protected]>
Signed-off-by: ZhangJian He <[email protected]>
@hezhangjian hezhangjian merged commit a33a25a into openGemini:main Jul 28, 2024
@hezhangjian hezhangjian changed the title feat: allow user config MaxConnsPerHost (#90) feat: allow user config MaxConnsPerHost and MaxIdleConnsPerHost (#90) Jul 28, 2024
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