headroom-0.4.3.0: License Header Manager
Copyright(c) 2019-2022 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.Command.Bootstrap

Description

Logic for running shared code and bootstrapping all Headroom command RIO applications.

Synopsis

Documentation

data BootstrapEnv Source #

Bootstrap environment, containing pieces shared between all commands.

Constructors

BootstrapEnv 

Fields

bootstrap :: (HasRIO FileSystem env, HasRIO KVStore env, HasRIO Network env, HasLogFunc env) => RIO env BootstrapEnv Source #

Executes the initialization logic that should be performed before any other code is executed. During this bootstrap, for example global configuration is initialized and loaded, welcome message is printed to console and updates are checked.

runRIO' Source #

Arguments

:: (LogFunc -> IO env)

function returning environment data

-> Bool

whether to run in debug mode

-> RIO env a

RIO application to execute

-> IO a

execution result

Runs RIO application using provided environment data and flag whether to run in debug mode.

globalKVStore :: HasRIO FileSystem env => RIO env (KVStore (RIO env)) Source #

Shared SQLite-based KVStore.