Options
data class Options(val key: String = UUID.randomUUID().toString(), val apiKey: String? = null, val fetchAuthToken: suspend (shouldRefresh: Boolean) -> String? = null, val syncLoopDuration: Duration = 50.milliseconds, val reconnectStreamDelay: Duration = 1_000.milliseconds)
User-settable options used when defining Client.
Constructors
Properties
Link copied to clipboard
fetchAuthToken
provides a token for the auth webhook. When the webhook response status code is 401, this function is called to refresh the token. The reason
parameter is the reason from the webhook response.
Link copied to clipboard
Delay of the reconnect stream. If the stream is disconnected, the client waits for the delay to reconnect the stream. The default value is 1000
(ms).
Link copied to clipboard
Duration of the sync loop. After each sync loop, the client waits for the duration to next sync. The default value is 50
(ms).