wai-rate-limit-postgres-0.6.0.0: See README for more info
Copyright(c) 2022 Aditya Manthramurthy
LicenseApache-2.0
MaintainerAditya Manthramurthy <aditya.mmy@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Network.Wai.RateLimit.Postgres

Description

A wai-rate-limit backend using PostgreSQL.

Synopsis

Documentation

postgresBackend :: Pool Connection -> Text -> IO (Backend ByteString) Source #

Initialize a postgres backend for rate-limiting. Takes a connection pool and table name to use for storage. The table will be created if it does not exist. A thread is also launched to periodically clean up expired rows from the table.