|
@@ -14,12 +14,14 @@ func DestroyDAPR() {
|
|
|
}
|
|
|
|
|
|
func GetInstance() *Client {
|
|
|
- client, err := newClient(clientTimeoutSec)
|
|
|
- if err != nil {
|
|
|
- panic(err)
|
|
|
- }
|
|
|
+ if clientInstance == nil {
|
|
|
+ client, err := newClient(clientTimeoutSec)
|
|
|
+ if err != nil {
|
|
|
+ panic(err)
|
|
|
+ }
|
|
|
|
|
|
- clientInstance = client
|
|
|
+ clientInstance = client
|
|
|
+ }
|
|
|
|
|
|
return clientInstance
|
|
|
}
|