----------------------------------------------------------------------------- -- | -- Module : Control.Application.Types -- Copyright : (c) 2020-2021 EMQ Technologies Co., Ltd. -- License : BSD-style (see the LICENSE file) -- -- Maintainer : Feng Lee, feng@emqx.io -- Yang M, yangm@emqx.io -- Stability : experimental -- Portability : portable -- -- The Application Types module. -- ----------------------------------------------------------------------------- module Control.Application.Types where import Control.Distributed.Node (Node) import Data.Timeout (Timeout) type Module = Atom type Application = Atom data StartType = Normal | Takeover Node | Failover Node data RestartType = Permanent | Transient | Temporary -- [{Par :: atom(), Val :: term()}] foreign import data Config :: Type -- [{Phase :: atom(), PhaseArgs :: term()}] | 'undefined'} foreign import data AppStartPhase :: Type -- PhaseArgs :: term() foreign import data AppPhaseArgs :: Type -- StartArgs :: term() foreign import data AppStartArgs :: Type -- StartError :: term() foreign import data AppStartError :: Type type AppSpec = { name :: Application , description :: String , vsn :: String , id :: String , modules :: [Module] , registered :: [String] , applications :: [Application] , includedApps :: [Application] , env :: Config , startPhases :: [AppStartPhase] , maxT :: Timeout , maxP :: Timeout , appMod :: Module , startArgs :: AppStartArgs } type AppDescr = { name :: Atom , desc :: String , vsn :: String }