TileFetchQueue

class TileFetchQueue(source: TilesetSource, parentScope: CoroutineScope, maxConcurrent: Int = 32, blobStore: BlobStore = NoOpBlobStore, byteSource: TileByteSource = HttpTileByteSource(), onAuthExpired: () -> Unit? = null)

Bounded coroutine pool for tileset.json + content payload fetches. Runs the TilesetAuthProvider rewrite before each GET; same path for root and per-tile.

Constructors

Link copied to clipboard
constructor(source: TilesetSource, parentScope: CoroutineScope, maxConcurrent: Int = 32, blobStore: BlobStore = NoOpBlobStore, byteSource: TileByteSource = HttpTileByteSource(), onAuthExpired: () -> Unit? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun fetchContent(request: TileContentRequest, onSuccess: suspend (bytes: ByteArray) -> Unit, onFailure: (Throwable) -> Unit): Job

Fetch a tile content payload. Returns raw bytes for ContentDispatcher to route.

Link copied to clipboard
fun fetchTileset(url: String, onSuccess: suspend (responseUrl: String, body: String) -> Unit, onFailure: (Throwable) -> Unit): Job

Fetch a tileset.json (root or external); supports auth-provider redirects.

Link copied to clipboard
fun shutdown()

Cancel in-flight requests + close the byte source (HTTP client / SLPK archive). Idempotent.