Skip to content

1.6.4 Helpers improvements

Latest
Compare
Choose a tag to compare
@Victor-Salomon Victor-Salomon released this 24 Apr 13:12
· 7 commits to main since this release

This release aims to:

  • Improve http and tee clusters helpers.

Contributors: @Victor-Salomon

✅ No breaking changes

HttpClient helper src/helper/http.ts

  • HttpClient() now accepts an optional timeout.
	const timeout = 10000 // 10sec(s)
	const http = new HttpClient(ensureHttps(enclaveUrl), timeout)

Tee helpers src/helper/tee.ts

  • getEnclaveHealthStatus() now accepts the optional timeout to manage HttpClient. (Default is 10000)
  • getEnclaveDataAndHealth() now accepts the optional timeout to manage HttpClient. (Default is 10000)
  • getFirstPublicClusterAvailable() now executes a health check within the function itself. The returned Cluster ID does not require the health check anymore. It also handles the new optional timeout to manage HttpClient. (Default is 10000).

Utility helper src/utils/tee.ts

  • timeoutTrigger() is a generic function that timeouts a promise.