multiTile

fun <K : Any, V> multiTile(block: suspend Mosaic.(Set<K>) -> Map<K, V>): MultiTile<K, V>(source)

Creates a multi-value tile using the DSL.

Return

A new MultiTile instance

val usersTile = multiTile<String, User> { userIds ->
userService.getUsers(userIds)
}

Parameters

block

A suspending function that produces a map of values for the given keys

Type Parameters

K

The type of keys used to request values

V

The type of values this tile produces