!,+)     None_  postgres-websocketsTOpens a thread that relays messages from the producer thread to the channels forever postgres-websocketsjReads the messages from the producer and relays them to the active listeners in their respective channels. postgres-websockets_Adds a listener to a certain multiplexer's channel. The listener must be a function that takes a 'TChan Message' and perform any IO action. All listeners run in their own thread. The first listener will open the channel, when a listener dies it will check if there acquire any others and close the channel when that's the case.   None_postgres-websockets0Possible situations encountered with client JWTspostgres-websocketsGiven a secret, a token and a timestamp it validates the claims and returns either an error message or a triple containing channel, mode and claims hashmap.postgres-websocketsRReceives the JWT secret (from config) and a JWT and returns a map of JWT claims.postgres-websocketsNInternal helper used to turn JWT ClaimSet into something easier to work withpostgres-websocketsInternal helper to generate HMAC-SHA256. When the jwt key in the config file is a simple string rather than a JWK object, we'll apply this function to it.None_(apostgres-websocketsReturns a multiplexer from a connection URI, keeps trying to connect in case there is any error. This function also spawns a thread that keeps relaying the messages from the database to the multiplexer's listenerspostgres-websocketsReturns a multiplexer from a connection URI or an error message on the left case This function also spawns a thread that keeps relaying the messages from the database to the multiplexer's listenerspostgres-websocketsReturns a multiplexer from a channel and an IO Connection, listen for different database notifications on the provided channel using the connection produced.tThis function also spawns a thread that keeps relaying the messages from the database to the multiplexer's listenersTo listen on channels *chat*  import Protolude import PostgresWebsockets.HasqlBroadcast import PostgresWebsockets.Broadcast import Hasql.Connection main = do conOrError <- H.acquire "postgres:/ localhosttest_database" let con = either (panic . show) id conOrError :: Connection multi <- newHasqlBroadcaster con onMessage multi "chat" (ch -> forever $ fmap print (atomically $ readTChan ch)   None7_+ postgres-websocketsxGiven a secret, a function to fetch the system time, a Hasql Pool and a Multiplexer this will give you a WAI middleware.    !"#$%&2postgres-websockets-0.6.0.0-KLph23vlK4M9Qp8rEnE0U8!PostgresWebsockets.HasqlBroadcastPostgresWebsockets.BroadcastPostgresWebsockets.ClaimsPostgresWebsockets"hasql-1.4.1-6ZBMYry5dw9Lg1JENwnCQFHasql.Private.Connectionacquire stm-2.5.0.0Control.Concurrent.STM.TQueue readTQueue writeTQueueControl.Concurrent.STM.TChan readTChan MultiplexersrcMessagechannelpayloadrelayMessagesForever relayMessagesnewMultiplexer onMessage$fShowMultiplexer $fEqMessage $fShowMessagevalidateClaims$fEqJWTAttemptnewHasqlBroadcasternewHasqlBroadcasterOrErrorpostgresWsMiddleware$fToJSONMessage$fGenericMessage JWTAttempt jwtClaims claims2maphs256jwknewHasqlBroadcasterForChannel