-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utility functions for creating servant 'Context's with "context/connection pooling" support -- -- Utility functions for creating servant Contexts with -- context/connection pooling support -- -- This package relies on the excellent resource-pool library. @package servant-pool @version 0.1 -- | Create servant Contexts with pooling support using -- resource-pool module Servant.Context.Pool -- | This is a handy function that lets you create the Context and -- the Pool altogether. It just calls createPool and -- applies contextOfPool. pooledContext :: IO c -> (c -> IO ()) -> Int -> NominalDiffTime -> Int -> IO (Context c) -- | Use this function to get a Context using a Pool you -- already have around. Note that the type in the Context is not -- Pool c but just c. -- -- It'll however use withResource under the hood to make a new -- connection available. That means taking an unused one from the pool or -- bringing a new one to life. contextOfPool :: Pool c -> Context c -- | This is a length of time, as measured by UTC. Conversion functions -- will treat it as seconds. It has a precision of 10^-12 s. It ignores -- leap-seconds, so it's not necessarily a fixed amount of clock time. -- For instance, 23:00 UTC + 2 hours of NominalDiffTime = 01:00 UTC (+ 1 -- day), regardless of whether a leap-second intervened. data NominalDiffTime :: *