-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
4,003 additions
and
1,863 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
cargo build --features=lang-cjk,video-ffmpeg --release && \ | ||
RUST_BACKTRACE=1 RUST_LOG="info,gossip_lib=debug" ./target/release/gossip "$@" \ | ||
| tee gossip.log.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.