úÎ!@W=w&      !"#$%Safe"#_X&'()*+,-;Distribute messages from one producer to several consumers.None"#_ 7 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.   <Parse and validate JWT to open postgres-websockets channels.None"#_Í.postgres-websockets0Possible situations encountered with client JWTspostgres-websockets Given 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.0postgres-websocketsNInternal helper used to turn JWT ClaimSet into something easier to work with1postgres-websocketsžInternal 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.1Manages PostgresWebsockets configuration options.None"#_!postgres-websockets#Config file settings for the serverpostgres-websocketsUser friendly version number postgres-websocketsˆLoad all postgres-websockets config from Environment variables. This can be used to use just the middleware or to feed into warpSettings!postgres-websockets^Given a shutdown handler and an AppConfig builds a Warp Settings to start a stand-alone server2postgres-websockets7Function to read and parse options from the environment ! !+Build a Hasql.Notifications based producer .None"#_4ù"postgres-websocketsØReturns 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 listeners#postgres-websocketsÈReturns 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 listeners3postgres-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:/ localhostÌtest_database" let con = either (panic . show) id conOrError :: Connection multi <- newHasqlBroadcaster con onMessage multi "chat" (ch -> forever $ fmap print (atomically $ readTChan ch)  "#"# LPostgresWebsockets WAI middleware, add functionality to any WAI application.None"#7_8ç$postgres-websocketsxGiven a secret, a function to fetch the system time, a Hasql Pool and a Multiplexer this will give you a WAI middleware.$@Functions to start a full stand-alone PostgresWebsockets server.None"#_?@2postgres-websockets-0.9.0.0-E1OltcevRiuBmnX1aW0DIF!PostgresWebsockets.HasqlBroadcastPostgresWebsockets.BroadcastPostgresWebsockets.ClaimsPostgresWebsockets.ConfigPostgresWebsocketsPaths_postgres_websocketsPostgresWebsockets.MiddlewarePostgresWebsockets.Server$hasql-1.4.4.2-KADAA3mei7Z7bkJ11AXzoyHasql.Private.Connectionacquire stm-2.5.0.0Control.Concurrent.STM.TQueue readTQueue writeTQueueControl.Concurrent.STM.TChan readTChan MultiplexersrcMessagechannelpayloadrelayMessagesForever relayMessagesnewMultiplexer onMessage$fShowMultiplexer $fEqMessage $fShowMessageConnectionInfovalidateClaims$fEqJWTAttempt AppConfigconfigDatabase configPath configHost configPortconfigListenChannelconfigJwtSecretconfigJwtSecretIsBase64 configPool configRetries prettyVersion loadConfig warpSettingsnewHasqlBroadcasternewHasqlBroadcasterOrErrorpostgresWsMiddlewareserveversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName JWTAttempt jwtClaims claims2maphs256jwk readOptionsnewHasqlBroadcasterForChannel