Package-level declarations

Properties

Link copied to clipboard
private lateinit var globalConfig: RetryPluginConfig
Link copied to clipboard

A plugin that enables the client to retry failed requests based on the Kresil Retry mechanism configuration and the HttpRequestRetry plugin provided by Ktor. Configuration can be done globally when installing the plugin, and on a per-request basis with the kRetry function.

Link copied to clipboard
private val logger: Logger

Functions

Link copied to clipboard
private fun copyRequestAndPropagateCompletion(request: HttpRequestBuilder): HttpRequestBuilder

Creates a copy of the given HTTP request builder, preserving its configuration but not the execution context, and guarantees that any completion or failure of the original request is mirrored onto the copy.

Link copied to clipboard
fun HttpRequestBuilder.kRetry(disable: Boolean = false, configure: RetryPluginConfigBuilder.() -> Unit = {})

Configures the KresilRetryPlugin on a per-request level. The configuration declared in this block will override the global configuration, or inherit from it if not specified.