Safe Haskell | None |
---|---|
Language | Haskell2010 |
You only need this module if you want to create a new backend for serverless-execute.
See LocalProcessBackend
for a minimal example.
- data Backend = Backend {
- bExecute :: ByteString -> BackendM ByteString
- data BackendM a
- const_SERVERLESS_EXECUTOR_MODE :: String
- data ExecutorFinalStatus a
- data ExecutorStatus a
- data ExecutorPendingStatus
- waiting :: BackendM ()
- waitingDesc :: Text -> BackendM ()
- submitted :: BackendM ()
- submittedDesc :: Text -> BackendM ()
- started :: BackendM ()
- startedDesc :: Text -> BackendM ()
- liftIO :: MonadIO m => forall a. IO a -> m a
- getExecutablePath :: IO FilePath
Writing a Backend
.
Backend
is responsible for running your functions in a remote environment.
See:
Backend | |
|
BackendM is essentially IO
, but also has the ability to report the status of the
executor.
const_SERVERLESS_EXECUTOR_MODE :: String Source #
We switch to executor mode only when argv[1] == const_SERVERLESS_EXECUTOR_MODE
.
Reporting status
data ExecutorFinalStatus a Source #
Generic (ExecutorFinalStatus a) Source # | |
Binary a => Binary (ExecutorFinalStatus a) Source # | |
type Rep (ExecutorFinalStatus a) Source # | |
data ExecutorStatus a Source #
data ExecutorPendingStatus Source #
waitingDesc :: Text -> BackendM () Source #
submittedDesc :: Text -> BackendM () Source #
startedDesc :: Text -> BackendM () Source #
Re-exports
getExecutablePath :: IO FilePath #
Returns the absolute pathname of the current executable.
Note that for scripts and interactive sessions, this is the path to the interpreter (e.g. ghci.)
Since: 4.6.0.0