-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Factory for quickly building a microservice
--
-- A quick out-of-box factory using to build microservices with many
-- useful builtin components based on boots-web.
@package boots-cloud
@version 0.2
-- | A quick out-of-box factory using to build microservices with many
-- useful builtin components based on boots-web.
module Boots.Cloud
-- | Register consule service.
buildConsul :: (MonadMask n, MonadIO n, HasSalak env, HasApp env, HasLogger env) => Factory n (WebEnv env context) ()
-- | Settings for a Manager. Please use the
-- defaultManagerSettings function and then modify individual
-- settings. For more information, see
-- http://www.yesodweb.com/book/settings-types.
--
-- Since 0.1.0
data ManagerSettings
-- | Keeps track of open connections for keep-alive.
--
-- If possible, you should share a single Manager between multiple
-- threads and requests.
--
-- Since 0.1.0
data Manager
-- | Create a Manager. The Manager will be shut down
-- automatically via garbage collection.
--
-- Creating a new Manager is a relatively expensive operation, you
-- are advised to share a single Manager between requests instead.
--
-- The first argument to this function is often
-- defaultManagerSettings, though add-on libraries may provide a
-- recommended replacement.
--
-- Since 0.1.0
newManager :: ManagerSettings -> IO Manager
-- | Number of connections to a single host to keep alive. Default: 10.
--
-- Since 0.1.0
managerConnCount :: ManagerSettings -> Int
-- | Create an insecure connection.
--
-- Since 0.1.0
managerRawConnection :: ManagerSettings -> IO (Maybe HostAddress -> String -> Int -> IO Connection)
-- | Create a TLS connection. Default behavior: throw an exception that TLS
-- is not supported.
--
-- Since 0.1.0
managerTlsConnection :: ManagerSettings -> IO (Maybe HostAddress -> String -> Int -> IO Connection)
-- | Default timeout to be applied to requests which do not provide a
-- timeout value.
--
-- Default is 30 seconds
managerResponseTimeout :: ManagerSettings -> ResponseTimeout
-- | Exceptions for which we should retry our request if we were reusing an
-- already open connection. In the case of IOExceptions, for example, we
-- assume that the connection was closed on the server and therefore open
-- a new one.
--
-- Since 0.1.0
managerRetryableException :: ManagerSettings -> SomeException -> Bool
-- | Action wrapped around all attempted Requests, usually used to
-- wrap up exceptions in library-specific types.
--
-- Default: wrap all IOExceptions in the
-- InternalException constructor.
managerWrapException :: ManagerSettings -> forall a. () => Request -> IO a -> IO a
-- | Total number of idle connection to keep open at a given time.
--
-- This limit helps deal with the case where you are making a large
-- number of connections to different hosts. Without this limit, you
-- could run out of file descriptors. Additionally, it can be set to zero
-- to prevent reuse of any connections. Doing this is useful when the
-- server your application is talking to sits behind a load balancer.
--
-- Default: 512
--
-- Since 0.3.7
managerIdleConnectionCount :: ManagerSettings -> Int
-- | Perform the given modification to a Request before performing
-- it.
--
-- Default: no modification
--
-- Since 0.4.4
managerModifyRequest :: ManagerSettings -> Request -> IO Request
-- | Perform the given modification to a Response after receiving
-- it.
--
-- Default: no modification
managerModifyResponse :: ManagerSettings -> Response BodyReader -> IO (Response BodyReader)
managerLogException :: HasLogger env => env -> ManagerSettings -> ManagerSettings