opensergo-go-sdk
opensergo-go-sdk copied to clipboard
Support functional option style API
Signed-off-by: Jiangnan Jia [email protected]
Describe what this PR does / why we need it
- with functional option style can make the API more convenient ~2. SDK now lacks a retry mechanism when connect to the transport stream~ ~3. invoke chain in the code is too long, need to re-format~
Does this pull request fix one issue?
Fixes #21
Describe how you did it
- add an functional option in package
api
, and add param inNewOpenSergoClient
~2. introduce theretry-go
component to realize retry mechanism~ ~3. re-format the code by extract func and struct~
Describe how to verify it
Special notes for reviews
@sczyh30 PTAL
Also cc @binbin0325