Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ReentrantMutexContextKey(val mutex: Mutex) : CoroutineContext.Key<ReentrantMutexContextElement>
Link copied to clipboard
data class RetryFlowDelayConfig(val scheduleBase: Duration = 100.milliseconds, val scheduleFactor: Double = 2.0, val scheduleLimit: Duration = 5.minutes, val scheduleJitter: ClosedRange<Double> = 0.9..1.1)
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.TYPEALIAS, AnnotationTarget.TYPE, AnnotationTarget.FUNCTION] )
Link copied to clipboard
annotation class TrixnityPrivateApi
Functions
Link copied to clipboard
fun byteArrayFlowFromInputStream(coroutineContext: CoroutineContext = ioContext, inputStreamFactory: suspend () -> InputStream): ByteArrayFlow
Link copied to clipboard
fun byteArrayFlowFromReadableStream(streamFactory: suspend () -> ReadableStream<Uint8Array<ArrayBuffer>>): ByteArrayFlow
Link copied to clipboard
fun byteArrayFlowFromSource(coroutineContext: CoroutineContext = ioContext, sourceFactory: suspend () -> Source): Flow<ByteArray>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun FileSystem.readByteArrayFlow(path: Path, coroutineContext: CoroutineContext = ioContext): ByteArrayFlow?
Link copied to clipboard
suspend fun <T> retry(scheduleBase: Duration = RetryFlowDelayConfig.default.scheduleBase, scheduleFactor: Double = RetryFlowDelayConfig.default.scheduleFactor, scheduleLimit: Duration = RetryFlowDelayConfig.default.scheduleLimit, scheduleJitter: ClosedRange<Double> = RetryFlowDelayConfig.default.scheduleJitter, onError: suspend (error: Throwable, delay: Duration) -> Unit = { _, _ -> }, block: suspend () -> T): T
Link copied to clipboard
fun <T> retryFlow(delayConfig: Flow<RetryFlowDelayConfig> = flowOf(RetryFlowDelayConfig()), onError: suspend (error: Throwable, delay: Duration) -> Unit = { _, _ -> }, block: suspend FlowCollector<T>.() -> Unit): Flow<T>
fun <T> retryFlow(scheduleBase: Duration = RetryFlowDelayConfig.default.scheduleBase, scheduleFactor: Double = RetryFlowDelayConfig.default.scheduleFactor, scheduleLimit: Duration = RetryFlowDelayConfig.default.scheduleLimit, scheduleJitter: ClosedRange<Double> = RetryFlowDelayConfig.default.scheduleJitter, onError: suspend (error: Throwable, delay: Duration) -> Unit = { _, _ -> }, block: suspend FlowCollector<T>.() -> Unit): Flow<T>
Link copied to clipboard
suspend fun retryLoop(delayConfig: Flow<RetryFlowDelayConfig> = flowOf(RetryFlowDelayConfig()), onError: suspend (error: Throwable, delay: Duration) -> Unit = { _, _ -> }, block: suspend () -> Unit)
suspend fun retryLoop(scheduleBase: Duration = RetryFlowDelayConfig.default.scheduleBase, scheduleFactor: Double = RetryFlowDelayConfig.default.scheduleFactor, scheduleLimit: Duration = RetryFlowDelayConfig.default.scheduleLimit, scheduleJitter: ClosedRange<Double> = RetryFlowDelayConfig.default.scheduleJitter, onError: suspend (error: Throwable, delay: Duration) -> Unit = { _, _ -> }, block: suspend () -> Unit)
Link copied to clipboard
Returns null, when maxSize exceeded.
Link copied to clipboard
The returned Flow can only be collected once!
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun BufferedSink.write(content: ByteArrayFlow, coroutineContext: CoroutineContext = ioContext)
suspend fun FileSystem.write(path: Path, content: ByteArrayFlow, coroutineContext: CoroutineContext = ioContext)
suspend fun OutputStream.write(content: ByteArrayFlow, coroutineContext: CoroutineContext = ioContext)
Link copied to clipboard
suspend fun ByteArrayFlow.writeTo(sink: BufferedSink, coroutineContext: CoroutineContext = ioContext)
suspend fun ByteArrayFlow.writeTo(outputStream: OutputStream, coroutineContext: CoroutineContext = ioContext)