Skip to content

Commit ecc11e7

Browse files
committed
chore: rename file, and components names related to events websocket
1 parent 49fee66 commit ecc11e7

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/main/kotlin/com/sakethh/linkora/Application.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,5 @@ fun Application.module() {
118118
timeout = 15.seconds
119119
maxFrameSize = Long.MAX_VALUE
120120
}
121-
eventsWebSocket()
121+
configureEventsWebSocket()
122122
}

src/main/kotlin/com/sakethh/linkora/WebSocket.kt renamed to src/main/kotlin/com/sakethh/linkora/EventsWebSocket.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.sakethh.linkora
22

3-
import com.sakethh.linkora.WebSocketManager.closeWriteChannel
4-
import com.sakethh.linkora.WebSocketManager.initializeWriteChannel
3+
import com.sakethh.linkora.EventsWebSocketManager.closeWriteChannel
4+
import com.sakethh.linkora.EventsWebSocketManager.initializeWriteChannel
55
import com.sakethh.linkora.domain.dto.Correlation
66
import io.ktor.server.application.*
77
import io.ktor.server.auth.*
@@ -10,7 +10,7 @@ import io.ktor.server.websocket.*
1010
import io.ktor.websocket.*
1111
import kotlinx.serialization.json.Json
1212

13-
fun Application.eventsWebSocket() {
13+
fun Application.configureEventsWebSocket() {
1414
routing {
1515
authenticate(Security.BEARER.name) {
1616
webSocket(path = "/events") {

src/main/kotlin/com/sakethh/linkora/WebSocketManager.kt renamed to src/main/kotlin/com/sakethh/linkora/EventsWebSocketManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import kotlinx.serialization.encodeToString
77
import kotlinx.serialization.json.Json
88
import java.util.concurrent.ConcurrentHashMap
99

10-
object WebSocketManager {
10+
object EventsWebSocketManager {
1111
private val writeChannels = ConcurrentHashMap<String, DefaultWebSocketServerSession>()
1212
private val json = Json {
1313
prettyPrint = true

src/main/kotlin/com/sakethh/linkora/utils/ResultCallResponse.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.sakethh.linkora.utils
22

3-
import com.sakethh.linkora.WebSocketManager
3+
import com.sakethh.linkora.EventsWebSocketManager
44
import io.ktor.http.*
55
import io.ktor.server.response.*
66
import io.ktor.server.routing.*
@@ -25,7 +25,7 @@ suspend inline fun <reified T> RoutingContext.respondWithResult(resultState: Res
2525
text = Json.encodeToString(resultState.response)
2626
)
2727
if (resultState.webSocketEvent != null) {
28-
WebSocketManager.sendEvent(resultState.webSocketEvent)
28+
EventsWebSocketManager.sendEvent(resultState.webSocketEvent)
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)