in
Clone
https://git.tahinli.com/Tahinli/in.git
0 watching0 forksRustAGPL-3.0528.7 KiB9215377Tahinli27 days ago37 commits
| 1 | //! The `in` binary: the process lifetime and the command line. The commands live in `cli`, the server in |
| 2 | //! `boot`, and each feature in its own module. |
| 3 | //! |
| 4 | //! `in [--config <path>] [serve]` runs the server; a bare `in` does the same. `export`, `fsck`, `restore` and |
| 5 | //! `quota recompute` run on a stopped instance. The configuration file is the `--config` path, then |
| 6 | //! `IN_CONFIG`, then `config/in.toml`. Exit status 0 is success, 1 a failure, 2 a usage error. |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | use PathBuf; |
| 31 | use ExitCode; |
| 32 | |
| 33 | use Parser; |
| 34 | use EnvFilter; |
| 35 | |
| 36 | use crate; |
| 37 | |
| 38 | /// The configuration file when neither `--config` nor `IN_CONFIG` names one. |
| 39 | const DEFAULT_CONFIG: &str = "config/in.toml"; |
| 40 | |
| 41 | /// The environment variable that names the configuration file. |
| 42 | const CONFIG_ENV: &str = "IN_CONFIG"; |
| 43 | |
| 44 | /// The configuration path: the flag, else `IN_CONFIG`, else the default. |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | /// Logs to stderr. The level comes from `RUST_LOG`, and defaults to `info`. |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | async |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 |