module Ecluse.Composition.MemoryPlan.Types (
MemoryPlan (..),
PublishTenant (..),
MirrorArtifactTenant (..),
QueueTenantDemand (..),
queueTenantDemand,
TransientBudget (..),
) where
import Ecluse.Composition.MirrorQueue (MirrorQueuePlan (MemoryBackend, SqsBackend), MirrorRuntimePlan (MirrorWith, NoMirroring))
data QueueTenantDemand
=
NoQueueTenant
|
MirroringWithoutMemoryQueue
|
MemoryQueueTenant
deriving stock (QueueTenantDemand -> QueueTenantDemand -> Bool
(QueueTenantDemand -> QueueTenantDemand -> Bool)
-> (QueueTenantDemand -> QueueTenantDemand -> Bool)
-> Eq QueueTenantDemand
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: QueueTenantDemand -> QueueTenantDemand -> Bool
== :: QueueTenantDemand -> QueueTenantDemand -> Bool
$c/= :: QueueTenantDemand -> QueueTenantDemand -> Bool
/= :: QueueTenantDemand -> QueueTenantDemand -> Bool
Eq, Int -> QueueTenantDemand -> ShowS
[QueueTenantDemand] -> ShowS
QueueTenantDemand -> String
(Int -> QueueTenantDemand -> ShowS)
-> (QueueTenantDemand -> String)
-> ([QueueTenantDemand] -> ShowS)
-> Show QueueTenantDemand
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> QueueTenantDemand -> ShowS
showsPrec :: Int -> QueueTenantDemand -> ShowS
$cshow :: QueueTenantDemand -> String
show :: QueueTenantDemand -> String
$cshowList :: [QueueTenantDemand] -> ShowS
showList :: [QueueTenantDemand] -> ShowS
Show)
queueTenantDemand :: MirrorRuntimePlan -> QueueTenantDemand
queueTenantDemand :: MirrorRuntimePlan -> QueueTenantDemand
queueTenantDemand = \case
MirrorRuntimePlan
NoMirroring -> QueueTenantDemand
NoQueueTenant
MirrorWith (SqsBackend SqsConfig
_) -> QueueTenantDemand
MirroringWithoutMemoryQueue
MirrorWith MirrorQueuePlan
MemoryBackend -> QueueTenantDemand
MemoryQueueTenant
newtype PublishTenant = PublishTenant
{ PublishTenant -> Int
ptAggregateBytes :: Int
}
deriving stock (PublishTenant -> PublishTenant -> Bool
(PublishTenant -> PublishTenant -> Bool)
-> (PublishTenant -> PublishTenant -> Bool) -> Eq PublishTenant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: PublishTenant -> PublishTenant -> Bool
== :: PublishTenant -> PublishTenant -> Bool
$c/= :: PublishTenant -> PublishTenant -> Bool
/= :: PublishTenant -> PublishTenant -> Bool
Eq, Int -> PublishTenant -> ShowS
[PublishTenant] -> ShowS
PublishTenant -> String
(Int -> PublishTenant -> ShowS)
-> (PublishTenant -> String)
-> ([PublishTenant] -> ShowS)
-> Show PublishTenant
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> PublishTenant -> ShowS
showsPrec :: Int -> PublishTenant -> ShowS
$cshow :: PublishTenant -> String
show :: PublishTenant -> String
$cshowList :: [PublishTenant] -> ShowS
showList :: [PublishTenant] -> ShowS
Show)
newtype MirrorArtifactTenant = MirrorArtifactTenant
{ MirrorArtifactTenant -> Int
matMaxBytes :: Int
}
deriving stock (MirrorArtifactTenant -> MirrorArtifactTenant -> Bool
(MirrorArtifactTenant -> MirrorArtifactTenant -> Bool)
-> (MirrorArtifactTenant -> MirrorArtifactTenant -> Bool)
-> Eq MirrorArtifactTenant
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MirrorArtifactTenant -> MirrorArtifactTenant -> Bool
== :: MirrorArtifactTenant -> MirrorArtifactTenant -> Bool
$c/= :: MirrorArtifactTenant -> MirrorArtifactTenant -> Bool
/= :: MirrorArtifactTenant -> MirrorArtifactTenant -> Bool
Eq, Int -> MirrorArtifactTenant -> ShowS
[MirrorArtifactTenant] -> ShowS
MirrorArtifactTenant -> String
(Int -> MirrorArtifactTenant -> ShowS)
-> (MirrorArtifactTenant -> String)
-> ([MirrorArtifactTenant] -> ShowS)
-> Show MirrorArtifactTenant
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MirrorArtifactTenant -> ShowS
showsPrec :: Int -> MirrorArtifactTenant -> ShowS
$cshow :: MirrorArtifactTenant -> String
show :: MirrorArtifactTenant -> String
$cshowList :: [MirrorArtifactTenant] -> ShowS
showList :: [MirrorArtifactTenant] -> ShowS
Show)
data MemoryPlan = MemoryPlan
{ MemoryPlan -> Int
mpRuntimeReserveBytes :: Int
, MemoryPlan -> Int
mpCacheAggregateBytes :: Int
, MemoryPlan -> Int
mpCacheMaxEntries :: Int
, MemoryPlan -> Int
mpMaxResponseBytes :: Int
, MemoryPlan -> Int
mpMaxRequestBytes :: Int
, MemoryPlan -> Int
mpAdmissionCapacity :: Int
, MemoryPlan -> Maybe PublishTenant
mpPublishTenant :: Maybe PublishTenant
, MemoryPlan -> Maybe MirrorArtifactTenant
mpMirrorArtifactTenant :: Maybe MirrorArtifactTenant
, MemoryPlan -> Int
mpQueueMemoryMaxDepth :: Int
, MemoryPlan -> Int
mpQueueTenantBytes :: Int
, MemoryPlan -> Int
mpFixedBufferBytes :: Int
, MemoryPlan -> TransientBudget
mpTransientBudget :: TransientBudget
, MemoryPlan -> [Text]
mpDegradations :: [Text]
, MemoryPlan -> [Text]
mpOverrideViolations :: [Text]
}
deriving stock (MemoryPlan -> MemoryPlan -> Bool
(MemoryPlan -> MemoryPlan -> Bool)
-> (MemoryPlan -> MemoryPlan -> Bool) -> Eq MemoryPlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryPlan -> MemoryPlan -> Bool
== :: MemoryPlan -> MemoryPlan -> Bool
$c/= :: MemoryPlan -> MemoryPlan -> Bool
/= :: MemoryPlan -> MemoryPlan -> Bool
Eq, Int -> MemoryPlan -> ShowS
[MemoryPlan] -> ShowS
MemoryPlan -> String
(Int -> MemoryPlan -> ShowS)
-> (MemoryPlan -> String)
-> ([MemoryPlan] -> ShowS)
-> Show MemoryPlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MemoryPlan -> ShowS
showsPrec :: Int -> MemoryPlan -> ShowS
$cshow :: MemoryPlan -> String
show :: MemoryPlan -> String
$cshowList :: [MemoryPlan] -> ShowS
showList :: [MemoryPlan] -> ShowS
Show)
data TransientBudget = TransientBudget
{ TransientBudget -> Maybe Int
tbLiveTargetBytes :: Maybe Int
, TransientBudget -> Int
tbExplainedBytes :: Int
, TransientBudget -> Int
tbBootBytes :: Int
, TransientBudget -> Maybe Int
tbLiveCeilingBytes :: Maybe Int
, TransientBudget -> Int
tbFloorBytes :: Int
, TransientBudget -> Maybe Int
tbOverflowLiveBytes :: Maybe Int
}
deriving stock (TransientBudget -> TransientBudget -> Bool
(TransientBudget -> TransientBudget -> Bool)
-> (TransientBudget -> TransientBudget -> Bool)
-> Eq TransientBudget
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TransientBudget -> TransientBudget -> Bool
== :: TransientBudget -> TransientBudget -> Bool
$c/= :: TransientBudget -> TransientBudget -> Bool
/= :: TransientBudget -> TransientBudget -> Bool
Eq, Int -> TransientBudget -> ShowS
[TransientBudget] -> ShowS
TransientBudget -> String
(Int -> TransientBudget -> ShowS)
-> (TransientBudget -> String)
-> ([TransientBudget] -> ShowS)
-> Show TransientBudget
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TransientBudget -> ShowS
showsPrec :: Int -> TransientBudget -> ShowS
$cshow :: TransientBudget -> String
show :: TransientBudget -> String
$cshowList :: [TransientBudget] -> ShowS
showList :: [TransientBudget] -> ShowS
Show)