Package-level declarations
Types
Link copied to clipboard
class HttpConnectivityOptions(val options: ConnectivityOptions = ConnectivityOptions(), val urls: List<String> = DEFAULT_URLS, val port: Int = DEFAULT_PORT, val method: HttpMethod = DEFAULT_HTTP_METHOD, val timeoutMs: Long = DEFAULT_TIMEOUT, val pollingIntervalMs: Long = DEFAULT_POLLING_INTERVAL_MS, val onPollResult: (result: PollResult) -> Unit? = null)
The HttpConnectivityOptions class is used to configure the HTTP connectivity monitoring.
Link copied to clipboard
Represents the result of a poll operation.
Functions
Link copied to clipboard
fun Connectivity(options: HttpConnectivityOptions = HttpConnectivityOptions(), scope: CoroutineScope = CoroutineScope(Dispatchers.Default), httpClient: HttpClient = HttpClient()): Connectivity
Creates a Connectivity instance for HTTP.
fun Connectivity(scope: CoroutineScope = CoroutineScope(Dispatchers.Default), httpClient: HttpClient = HttpClient(), options: HttpConnectivityOptions.Builder.() -> Unit): Connectivity
Creates a Connectivity instance for HTTP using a builder pattern for the HttpConnectivityOptions.
Link copied to clipboard
Forces a poll of the connectivity status.
Link copied to clipboard
fun ConnectivityOptions.Companion.http(block: HttpConnectivityOptions.Builder.() -> Unit): HttpConnectivityOptions
Builds a new HttpConnectivityOptions instance using a builder pattern.