@@ -27,12 +27,12 @@ import kotlinx.coroutines.launch
27
27
28
28
private val logger = logger { }
29
29
30
- typealias ArtifactResult = Result <Map <String , Artifact >? >
30
+ typealias CachedVersionArtifact = Result <Map <String , Artifact >? >
31
31
32
32
private val prefetchScope = CoroutineScope (Dispatchers .IO )
33
33
34
34
fun Routing.artifactRoutes (
35
- bindingsCache : LoadingCache <ActionCoords , ArtifactResult >,
35
+ bindingsCache : LoadingCache <ActionCoords , CachedVersionArtifact >,
36
36
prometheusRegistry : PrometheusMeterRegistry ? = null,
37
37
) {
38
38
prometheusRegistry?.let {
@@ -50,15 +50,15 @@ fun Routing.artifactRoutes(
50
50
51
51
private fun Route.artifact (
52
52
prometheusRegistry : PrometheusMeterRegistry ? ,
53
- bindingsCache : LoadingCache <ActionCoords , ArtifactResult >,
53
+ bindingsCache : LoadingCache <ActionCoords , CachedVersionArtifact >,
54
54
refresh : Boolean = false,
55
55
) {
56
56
headArtifact(bindingsCache, prometheusRegistry, refresh)
57
57
getArtifact(bindingsCache, prometheusRegistry, refresh)
58
58
}
59
59
60
60
private fun Route.headArtifact (
61
- bindingsCache : LoadingCache <ActionCoords , ArtifactResult >,
61
+ bindingsCache : LoadingCache <ActionCoords , CachedVersionArtifact >,
62
62
prometheusRegistry : PrometheusMeterRegistry ? ,
63
63
refresh : Boolean ,
64
64
) {
@@ -78,7 +78,7 @@ private fun Route.headArtifact(
78
78
}
79
79
80
80
private fun Route.getArtifact (
81
- bindingsCache : LoadingCache <ActionCoords , ArtifactResult >,
81
+ bindingsCache : LoadingCache <ActionCoords , CachedVersionArtifact >,
82
82
prometheusRegistry : PrometheusMeterRegistry ? ,
83
83
refresh : Boolean ,
84
84
) {
@@ -102,7 +102,7 @@ private fun Route.getArtifact(
102
102
103
103
internal fun prefetchBindingArtifacts (
104
104
coords : Collection <ActionCoords >,
105
- bindingsCache : LoadingCache <ActionCoords , ArtifactResult >,
105
+ bindingsCache : LoadingCache <ActionCoords , CachedVersionArtifact >,
106
106
) {
107
107
prefetchScope.launch {
108
108
bindingsCache.getAll(coords)
@@ -111,7 +111,7 @@ internal fun prefetchBindingArtifacts(
111
111
112
112
private suspend fun ApplicationCall.toBindingArtifacts (
113
113
refresh : Boolean ,
114
- bindingsCache : LoadingCache <ActionCoords , ArtifactResult >,
114
+ bindingsCache : LoadingCache <ActionCoords , CachedVersionArtifact >,
115
115
): Map <String , Artifact >? {
116
116
val actionCoords = parameters.extractActionCoords(extractVersion = true )
117
117
0 commit comments