openGemini / opengemini-client-go

CNCF openGemini Go Client Library
https://opengemini.org/
Apache License 2.0
24 stars 17 forks source link

feat: allow user config MaxConnsPerHost and MaxIdleConnsPerHost (#90) #111

Closed wolfbolin closed 4 months ago

wolfbolin commented 4 months ago

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

wolfbolin commented 4 months ago

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?

shoothzj commented 4 months ago

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

shoothzj commented 4 months ago

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