opensergo-go-sdk
opensergo-go-sdk copied to clipboard
Add reuse mechanism for OpenSergoClient
Issue Description
Type: feature request
Describe what feature you want
In current version, OpenSergoClient uses prototype mode.
SDK will create a new instance when invoke NewOpenSergoClient
, even if the endpoint is the same.
It is very expensive without reuse mechanism, so we need a reuse mechanism to avoid it.
@jnan806 Hi, I use a map with host:port as key and openSergoClient as value to control reuse, and use sync.map to avoid concurrent access problems.
I think it should work.