Copyright | (c) Soostone Inc 2020 |
---|---|
License | AllRightsReserved |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data AppConfig = AppConfig {}
- data RuntimeEventType backend
- = RuntimeEventStart
- | RuntimeEventDone (CreateQueryStats backend) (Maybe (HookQueryStats backend))
- | RuntimeEventFailed String
- | RuntimeEventSkipped
- data EventSource
- refEventSource :: EventSource -> String
- data RuntimeEvent backend
- = RuntimeEvent EventSource (RuntimeEventType backend)
- | RuntimeEventSkipMany [EventSource]
- | RuntimeEventComplete (QueryStats backend)
- | RuntimeEventFatal
- type RuntimeEventQueue backend = TBQueue (RuntimeEvent backend)
- data ComboEnv backend = ComboEnv {
- _ceAppConfig :: AppConfig
- _ceLog :: LogEnv
- _ceEventQueue :: Maybe (RuntimeEventQueue backend)
- type ComboT backend m = ReaderT (ComboEnv backend) (KatipT m)
- type Combo bk = ComboT bk IO
- class HasAppConfig c where
- appConfig :: Lens' c AppConfig
- acAppName :: Lens' c Text
- acInteractive :: Lens' c Bool
- acLogOptions :: Lens' c LogOptions
- ceLog :: forall k (backend :: k). Lens' (ComboEnv (backend :: k)) LogEnv
- ceEventQueue :: forall k (backend :: k) k (backend :: k). Lens (ComboEnv (backend :: k)) (ComboEnv (backend :: k)) (Maybe (RuntimeEventQueue backend)) (Maybe (RuntimeEventQueue backend))
- ceAppConfig :: forall k (backend :: k). Lens' (ComboEnv (backend :: k)) AppConfig
Documentation
Instances
data RuntimeEventType backend #
Maintains some basic, human-reportable state over the run of the Spec in order to show progress.
RuntimeEventStart | generated when a Spec starts to run |
RuntimeEventDone (CreateQueryStats backend) (Maybe (HookQueryStats backend)) | generated when a Spec successfully completes |
RuntimeEventFailed String | generated when a Spec throws an error |
RuntimeEventSkipped | generated when a Spec update is skipped |
Instances
Show (QueryStats backend) => Show (RuntimeEventType backend) # | |
Defined in Napkin.Spec.ComboTypes showsPrec :: Int -> RuntimeEventType backend -> ShowS # show :: RuntimeEventType backend -> String # showList :: [RuntimeEventType backend] -> ShowS # | |
Eq (QueryStats backend) => Eq (RuntimeEventType backend) # | |
Defined in Napkin.Spec.ComboTypes (==) :: RuntimeEventType backend -> RuntimeEventType backend -> Bool # (/=) :: RuntimeEventType backend -> RuntimeEventType backend -> Bool # |
data EventSource #
Instances
Show EventSource # | |
Defined in Napkin.Spec.ComboTypes showsPrec :: Int -> EventSource -> ShowS # show :: EventSource -> String # showList :: [EventSource] -> ShowS # | |
Eq EventSource # | |
Defined in Napkin.Spec.ComboTypes (==) :: EventSource -> EventSource -> Bool # (/=) :: EventSource -> EventSource -> Bool # |
refEventSource :: EventSource -> String #
data RuntimeEvent backend #
RuntimeEvent EventSource (RuntimeEventType backend) | |
RuntimeEventSkipMany [EventSource] | bulk event updater since napkin is often run with many tables skipped |
RuntimeEventComplete (QueryStats backend) | generated when napkin is done running |
RuntimeEventFatal | generated from the napkin backend for fatal events (such as failed validation) |
Instances
Show (QueryStats backend) => Show (RuntimeEvent backend) # | |
Defined in Napkin.Spec.ComboTypes showsPrec :: Int -> RuntimeEvent backend -> ShowS # show :: RuntimeEvent backend -> String # showList :: [RuntimeEvent backend] -> ShowS # | |
Eq (QueryStats backend) => Eq (RuntimeEvent backend) # | |
Defined in Napkin.Spec.ComboTypes (==) :: RuntimeEvent backend -> RuntimeEvent backend -> Bool # (/=) :: RuntimeEvent backend -> RuntimeEvent backend -> Bool # |
type RuntimeEventQueue backend = TBQueue (RuntimeEvent backend) #
ComboEnv | |
|
Instances
HasAppConfig (ComboEnv backend) # | |
class HasAppConfig c where #
Instances
HasAppConfig AppConfig # | |
HasAppConfig (ComboEnv backend) # | |
ceEventQueue :: forall k (backend :: k) k (backend :: k). Lens (ComboEnv (backend :: k)) (ComboEnv (backend :: k)) (Maybe (RuntimeEventQueue backend)) (Maybe (RuntimeEventQueue backend)) #
ceAppConfig :: forall k (backend :: k). Lens' (ComboEnv (backend :: k)) AppConfig #