module TestContainers.Config
  ( Config (..),
    defaultConfig,
    defaultDockerConfig,
    determineConfig,
  )
where

import {-# SOURCE #-} TestContainers.Docker (createRyukReaper)
import TestContainers.Monad (Config (..))

-- | Default configuration.
--
-- @since 0.5.0.0
defaultConfig :: Config
defaultConfig :: Config
defaultConfig =
  Config
    { configDefaultWaitTimeout :: Maybe Int
configDefaultWaitTimeout = forall a. a -> Maybe a
Just Int
60,
      configTracer :: Tracer
configTracer = forall a. Monoid a => a
mempty,
      configCreateReaper :: TestContainer Reaper
configCreateReaper = TestContainer Reaper
createRyukReaper
    }

-- | Default configuration.
--
-- @since 0.2.0.0
defaultDockerConfig :: Config
defaultDockerConfig :: Config
defaultDockerConfig =
  Config
defaultConfig

-- | Autoselect the default configuration depending on wether you use Docker For
-- Mac or not.
determineConfig :: IO Config
determineConfig :: IO Config
determineConfig =
  forall (f :: * -> *) a. Applicative f => a -> f a
pure Config
defaultDockerConfig