Package-level declarations

Types

Link copied to clipboard
interface Closeable

Represents a resource or entity that can be closed to release any associated resources.

Link copied to clipboard
data class HiddenString(val value: String, placeholder: String = HIDDEN_STRING_PLACEHOLDER)

Represents a string whose actual value is hidden when converted to a string representation.

Link copied to clipboard
@ApiStatus.Experimental
interface KoogHttpClient

Abstract interfaces defining a contract for HTTP client implementations. Provides methods for making HTTP POST requests and handling Server-Sent Events (SSE) streams.

Properties

Link copied to clipboard
actual val <Error class: unknown class>.SuitableForIO: <Error class: unknown class>

A CoroutineDispatcher that is suitable for IO operations. It delegates to Dispatchers.Default, which is optimized for CPU-intensive tasks but can also be used for IO-bound or mixed workloads when a specific dispatcher for IO is not required or unavailable.

A platform-specific CoroutineDispatcher optimized for executing IO-intensive operations.

Represents a CoroutineDispatcher that is suitable for IO-intensive operations. Delegates to the default dispatcher, which is optimized for tasks such as file I/O, network operations, or database queries that do not heavily utilize CPU resources. It is designed to handle a large number of tasks with minimal thread overhead.

A platform-specific property that represents a coroutine dispatcher suitable for IO-intensive tasks, such as file or network operations. It typically maps to Dispatchers.IO and provides an optimized thread pool for handling such workloads.

A CoroutineDispatcher that is suitable for IO operations. It delegates to Dispatchers.Default, which is optimized for CPU-intensive tasks but can also be used for IO-bound or mixed workloads when a specific dispatcher for IO is not required or unavailable.

Functions

Link copied to clipboard
@ApiStatus.Experimental
fun KoogHttpClient.Companion.fromKtorClient(clientName: String, logger: KLogger, baseClient: HttpClient = io.ktor.client.HttpClient(), configurer: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit): KoogHttpClient

Creates a new instance of KoogHttpClient using a Ktor-based HTTP client for performing HTTP operations.

Link copied to clipboard
inline suspend fun <Type : Closeable, Return> Type.use(action: suspend (Type) -> Return): Return

Executes the given action block on this Closeable resource and ensures that the resource is closed after the block execution, whether it completes normally or with an exception.