MCPcopy Create free account

hub / github.com/JoyalAJohney/Realtime-distributed-chat / functions

Functions64 in github.com/JoyalAJohney/Realtime-distributed-chat

↓ 3 callersFunctionPublishMessage
(room string, message *models.Message)
src/cache/pubsub.go:70
↓ 2 callersFunctionRemoveConnection
Remove a connection from the Map
src/chat/user.connections.go:20
↓ 2 callersFunctionSendErrorMessage
(conn *websocket.Conn, errMsg string)
src/utils/utils.go:12
↓ 2 callersFunctionValidateJWTToken
(tokenString string)
src/auth/middleware.go:27
↓ 2 callersFunctionremoveUserFromRoomInRedis
(room string, user *models.User)
src/chat/rooms.go:157
↓ 1 callersFunctionAddConnection
Register a new connection in the Map
src/chat/user.connections.go:13
↓ 1 callersFunctionBroadcastToRoom
(room string, message models.Message)
src/chat/rooms.go:55
↓ 1 callersFunctionCheckAndUnsubscribeFromRoom
(room string)
src/cache/pubsub.go:53
↓ 1 callersFunctionGenerateJWT
(userID string, username string)
src/auth/handler.go:124
↓ 1 callersFunctionGetAllRooms
()
src/cache/pubsub.go:82
↓ 1 callersFunctionGetConnection
Get a connection from the Map
src/chat/user.connections.go:27
↓ 1 callersFunctionGetResponseFromLLM
(prompt string)
src/chat/rooms.go:90
↓ 1 callersFunctionInitPostgres
()
src/database/connection.go:33
↓ 1 callersFunctionInitRedis
()
src/cache/redis.go:43
↓ 1 callersFunctionJoinRoom
(room string, user *models.User)
src/chat/rooms.go:23
↓ 1 callersFunctionLeaveAllRooms
(user *models.User)
src/chat/rooms.go:141
↓ 1 callersFunctionLeaveRoom
(room string, user *models.User)
src/chat/rooms.go:122
↓ 1 callersFunctionParseJWTToken
(tokenString string)
src/auth/middleware.go:35
↓ 1 callersFunctionPublishMessage
(message models.Message)
src/kafka/kafka.go:32
↓ 1 callersFunctionSendMessageToRoom
(message models.Message, user *models.User)
src/chat/rooms.go:70
↓ 1 callersFunctionSubscribeToRoom
(room string, callback models.MessageHandlerCallbackType)
src/cache/pubsub.go:17
↓ 1 callersFunctionaddUserToRoomInRedis
Helper methods
src/chat/rooms.go:151
↓ 1 callersFunctiongetAllMembersInRoom
(room string)
src/chat/rooms.go:173
↓ 1 callersFunctiongetUserIDFromToken
(token)
web/src/components/Login.js:34
↓ 1 callersFunctionisUserInRoom
(room string, user *models.User)
src/chat/rooms.go:163
↓ 1 callersFunctionlistenForMessages
Listen for messages on the single PubSub connection
src/cache/pubsub.go:35
↓ 1 callersFunctionreportWebVitals
web/src/reportWebVitals.js:1
↓ 1 callersFunctionsendMessage
()
web/src/components/ChatRoom.js:67
FunctionApp
()
web/src/App.js:11
FunctionAuthorizationMiddleware
(ctx *fiber.Ctx)
src/auth/middleware.go:12
FunctionGenerateUserID
()
src/utils/utils.go:23
FunctionHomeButton
()
web/src/components/HomeButton.js:4
FunctionInitPostgres
()
kafka-consumer/database/postgres.go:33
FunctionLandingPage
()
web/src/components/LandingPage.js:5
FunctionLogin
(ctx *fiber.Ctx)
src/auth/handler.go:72
FunctionNewKafkaConsumer
()
kafka-consumer/kafka/kafka.go:27
FunctionProcessMessages
(messages []Message)
kafka-consumer/processor/processor.go:10
FunctionSignUp
(ctx *fiber.Ctx)
src/auth/handler.go:17
FunctionWebSocketHandler
(conn *websocket.Conn)
src/chat/handler.go:12
FunctionWebSocketProvider
({ children })
web/src/WebsocketContext.js:5
FunctionaddEmoji
(emoji)
web/src/components/ChatRoom.js:63
FunctiongetEnv
(key string, fallback string)
src/config/config.go:49
FunctiongetEnv
(key string, fallback string)
kafka-consumer/config/config.go:41
FunctionhandleClose
()
web/src/components/ChatRoom.js:34
FunctionhandleEmojiPickerToggle
()
web/src/components/ChatRoom.js:53
FunctionhandleJoin
(e)
web/src/components/JoinRoom.js:54
FunctionhandleKeyDown
(e)
web/src/components/ChatRoom.js:79
FunctionhandleMessage
(message)
web/src/components/JoinRoom.js:37
FunctionhandleMessage
(message)
web/src/components/ChatRoom.js:29
FunctionhandleOutsideClick
(e)
web/src/components/ChatRoom.js:57
FunctionhandleSubmit
(e)
web/src/components/Login.js:12
FunctionhandleSubmit
(e)
web/src/components/Signup.js:12
Functioninit
* A single go server instance have a single redis connection pool From the redis connection pool, one connection is used for PubSub connection That
src/cache/redis.go:36
Functioninit
()
src/database/connection.go:23
Functioninit
()
src/kafka/kafka.go:23
Functioninit
()
src/config/config.go:26
Functioninit
()
kafka-consumer/database/postgres.go:23
Functioninit
()
kafka-consumer/kafka/kafka.go:18
Functioninit
()
kafka-consumer/config/config.go:22
FunctionleaveRoom
()
web/src/components/ChatRoom.js:74
Functionmain
()
src/main.go:18
Functionmain
()
kafka-consumer/main.go:15
FunctionmessageWithLineBreaks
(message)
web/src/components/ChatRoom.js:87
FunctionupgradeToWebSocket
Authorize and Upgrate to websocket
src/main.go:48