Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Represents a fingerprint of an upload url. This is used to identify an upload url in the cache. Use Fingerprint.invoke to create a fingerprint

Link copied to clipboard
class MemoryResumableCache(map: MutableMap<String, String> = AtomicMutableMap()) : ResumableCache

A ResumableCache implementation using AtomicMutableMap. This implementation saves the urls in memory. If you want a disk based cache, use Disk. By default, cached urls expire after 30 minutes. You can change this by passing a custom AtomicMutableMap to the constructor

Link copied to clipboard
interface ResumableCache

A cache for storing resumable upload urls

Link copied to clipboard
@Serializable
data class ResumableCacheEntry(val url: String, val path: String, val bucketId: String, val expiresAt: Instant, val upsert: Boolean = false, val contentType: String = "application/octet-stream")

Represents a cache entry for a resumable upload

Link copied to clipboard
sealed interface ResumableClient

Represents a resumable client. Can be used to create or continue resumable uploads.

Link copied to clipboard
sealed interface ResumableUpload

Represents a resumable upload. Can be paused, resumed or cancelled. The upload urls are automatically cashed, so you can resume the upload after your program crashed or the network reconnected without losing the upload progress. You can customize the caching in Storage.Config

Link copied to clipboard
data class ResumableUploadState(val fingerprint: Fingerprint, cacheEntry: ResumableCacheEntry, val status: UploadStatus, val paused: Boolean)

Represents the state of a resumable upload

Link copied to clipboard
class SettingsResumableCache(settings: Settings = Settings()) : ResumableCache

A ResumableCache implementation using com.russhwolf.settings.Settings. This implementation saves the urls on the disk. If you want a memory only cache, use Memory. Unsupported on Linux.

Functions