mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 16:31:18 +00:00
SETUP_AND_SHUTDOWN process doc
This commit is contained in:
parent
82eea24f51
commit
ee05f4f04d
48
docs/SETUP_AND_SHUTDOWN.md
Normal file
48
docs/SETUP_AND_SHUTDOWN.md
Normal file
@ -0,0 +1,48 @@
|
||||
# Setup and Shutdown
|
||||
|
||||
This may change, but this is approximately the order of events.
|
||||
|
||||
- bin::main()
|
||||
- setup logging
|
||||
- lib::init()
|
||||
- storage::init()
|
||||
- trigger database into existence
|
||||
- migrate
|
||||
- signer::init()
|
||||
- load from settings in storage
|
||||
- deletation init
|
||||
- setup wait-for-login state
|
||||
- setup async runtime
|
||||
- optionally handle command-line command and exit, else
|
||||
- spawn (two threads as below)
|
||||
|
||||
- spawn-thread
|
||||
- lib::run()
|
||||
- overlord::run()
|
||||
- maybe wait-for-login (the UI has to do it)
|
||||
- start fetcher
|
||||
- start People tasks
|
||||
- start relay picker
|
||||
- pick relays
|
||||
- subscribe discover
|
||||
- subscribe outbox
|
||||
- subscribe inbox
|
||||
- loop
|
||||
- Get and handle messages
|
||||
- or if shutdown variable is set, exit this loop
|
||||
- storage::sync()
|
||||
- set shutdown variable
|
||||
- message minions to shutdown
|
||||
- wait for minions to shutdown
|
||||
- end of spawn-thread
|
||||
|
||||
- main-thread
|
||||
- ui::run()
|
||||
- Setup and run the UI
|
||||
- if wait-for-login, prompt for password and login
|
||||
- once logged in, indicate such so the overlord can start, and run UI as normal
|
||||
- If shutdown variable is set, exit
|
||||
- Signal overlord to shutdown
|
||||
- Wait for spawn-thread to end
|
||||
- lib::shutdown()
|
||||
- storage::sync()
|
Loading…
Reference in New Issue
Block a user