package dapr_client var clientInstance *Client var clientTimeoutSec int64 func InitDAPR(timeoutSec int64) { clientTimeoutSec = timeoutSec } func DestroyDAPR() { if clientInstance != nil { destroyClient(clientInstance) clientInstance = nil } } func GetInstance() *Client { if clientInstance == nil { client, err := newClient(clientTimeoutSec) if err != nil { return nil } clientInstance = client } return clientInstance }