Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
2dd5cf8c
Commit
2dd5cf8c
authored
10 months ago
by
Jason Volk
Committed by
🥺
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
move clap; fix version
Signed-off-by:
Jason Volk
<
jason@zemos.net
>
parent
74832bdc
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/core/utils/mod.rs
+0
-1
0 additions, 1 deletion
src/core/utils/mod.rs
src/main/clap.rs
+5
-6
5 additions, 6 deletions
src/main/clap.rs
src/main/main.rs
+2
-1
2 additions, 1 deletion
src/main/main.rs
src/main/server.rs
+4
-2
4 additions, 2 deletions
src/main/server.rs
with
11 additions
and
10 deletions
src/core/utils/mod.rs
+
0
−
1
View file @
2dd5cf8c
...
...
@@ -13,7 +13,6 @@
use
crate
::{
Error
,
Result
};
pub
mod
clap
;
pub
mod
content_disposition
;
pub
mod
defer
;
...
...
This diff is collapsed.
Click to expand it.
src/
core/utils
/clap.rs
→
src/
main
/clap.rs
+
5
−
6
View file @
2dd5cf8c
...
...
@@ -2,19 +2,18 @@
use
std
::
path
::
PathBuf
;
pub
use
clap
::
Parser
;
use
super
::
conduwuit_version
;
use
clap
::
Parser
;
use
conduit_core
::
utils
::
conduwuit_version
;
/// Commandline arguments
#[derive(Parser,
Debug)]
#[clap(version
=
conduwuit_version(),
about,
long_about
=
None)]
pub
struct
Args
{
pub
(
crate
)
struct
Args
{
#[arg(short,
long)]
/// Optional argument to the path of a conduwuit config TOML file
pub
config
:
Option
<
PathBuf
>
,
pub
(
crate
)
config
:
Option
<
PathBuf
>
,
}
/// Parse commandline arguments into structured data
#[must_use]
pub
fn
parse
()
->
Args
{
Args
::
parse
()
}
pub
(
crate
)
fn
parse
()
->
Args
{
Args
::
parse
()
}
This diff is collapsed.
Click to expand it.
src/main/main.rs
+
2
−
1
View file @
2dd5cf8c
pub
(
crate
)
mod
clap
;
mod
mods
;
mod
server
;
...
...
@@ -5,7 +6,7 @@
use
std
::{
cmp
,
sync
::
Arc
,
time
::
Duration
};
use
conduit
::{
debug_info
,
error
,
utils
::
clap
,
Error
,
Result
};
use
conduit
::{
debug_info
,
error
,
Error
,
Result
};
use
server
::
Server
;
use
tokio
::
runtime
;
...
...
This diff is collapsed.
Click to expand it.
src/main/server.rs
+
4
−
2
View file @
2dd5cf8c
...
...
@@ -5,12 +5,14 @@
config
::
Config
,
info
,
log
::{
LogLevelReloadHandles
,
ReloadHandle
},
utils
::
{
clap
,
maximize_fd_limit
}
,
utils
::
maximize_fd_limit
,
Error
,
Result
,
};
use
tokio
::
runtime
;
use
tracing_subscriber
::{
prelude
::
*
,
reload
,
EnvFilter
,
Registry
};
use
crate
::
clap
::
Args
;
/// Server runtime state; complete
pub
(
crate
)
struct
Server
{
/// Server runtime state; public portion
...
...
@@ -27,7 +29,7 @@ pub(crate) struct Server {
}
impl
Server
{
pub
(
crate
)
fn
build
(
args
:
clap
::
Args
,
runtime
:
Option
<&
runtime
::
Handle
>
)
->
Result
<
Arc
<
Server
>
,
Error
>
{
pub
(
crate
)
fn
build
(
args
:
Args
,
runtime
:
Option
<&
runtime
::
Handle
>
)
->
Result
<
Arc
<
Server
>
,
Error
>
{
let
config
=
Config
::
new
(
args
.config
)
?
;
#[cfg(feature
=
"sentry_telemetry"
)]
let
sentry_guard
=
init_sentry
(
&
config
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment