Skip to content

opensavvy.progress

The Progress interface hierarchy.

Overview

When storing progress events:

When reporting events, most of the code should use the done and the loading helpers.

Types

ExperimentalProgressApi

@RequiresOptIn(message = "This API is experimental and may be changed in the future. If you find it useful, please get in touch to share your use-case: https://gitlab.com/opensavvy/groundwork/pedestal/-/issues/new.")
annotation class ExperimentalProgressApi

Progress

sealed interface Progress

Is work currently happening?

Progressive

@ExperimentalProgressApi
data class Progressive<out Value>(val value: Value, val progress: Progress)

Stores a value along with progress information.

Functions

done

All scheduled work for this task has been done.

loading

Some scheduled work is ongoing, but we have no information on how much is left.

Some scheduled work is ongoing, and we can estimate the ratio of what has been done compared to what's left to do.