31 lines
653 B
Haskell
31 lines
653 B
Haskell
-- SPDX-FileCopyrightText: 2024 Sarah Vaupel <sarah.vaupel@uniworx.de>
|
|
--
|
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
module Settings.ResourcePool
|
|
( ResourcePoolConf(..)
|
|
, _poolStripes, _poolTimeout, _poolLimit
|
|
) where
|
|
|
|
import ClassyPrelude
|
|
|
|
import Utils.Lens.TH
|
|
import Utils.PathPiece (camelToPathPiece')
|
|
|
|
import Data.Aeson
|
|
import Data.Aeson.TH
|
|
import Data.Time.Clock
|
|
|
|
|
|
data ResourcePoolConf = ResourcePoolConf
|
|
{ poolStripes :: Int
|
|
, poolTimeout :: NominalDiffTime
|
|
, poolLimit :: Int
|
|
} deriving (Show)
|
|
|
|
makeLenses_ ''ResourcePoolConf
|
|
|
|
deriveFromJSON defaultOptions
|
|
{ fieldLabelModifier = camelToPathPiece' 1
|
|
} ''ResourcePoolConf
|