opensergo-go-sdk icon indicating copy to clipboard operation
opensergo-go-sdk copied to clipboard

Add reuse mechanism for OpenSergoClient

Open jnan806 opened this issue 2 years ago • 1 comments

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 avatar Feb 06 '23 08:02 jnan806

@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.

mayooot avatar Mar 27 '24 05:03 mayooot