summaryrefslogtreecommitdiff
path: root/crates/arti-relay/src/builder.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti-relay: Rename remaining XXXs to be TODOsDavid Goulet2024-10-101-2/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* arti-relay: Remove the use of pub and pub useDavid Goulet2024-10-101-2/+2
| | | | | | | | | | | | | | | The "pub" and "pub(crate)" visibility in a binary crate is essentially the same except for the dead_code warning analysis which ignores "pub" but will warn at "pub(crate)". This should get fixed soon according to: https://github.com/rust-lang/rust/issues/74970 However, for now, lets catch all this dead code :). Part of #1674 Signed-off-by: David Goulet <[email protected]>
* arti-relay: Remove its library crateDavid Goulet2024-10-101-1/+4
| | | | | | | | | | | | Simply, the lib.rs is renamed to relay.rs (containing TorRelay object) so this crate can never be used as a library. This is important because at the moment, we don't want to have a relay stable API that can be used to embed relays in applications. Closes #1674 Signed-off-by: David Goulet <[email protected]>
* arti-relay: add and use `Error`/`ErrorDetail`Steven Engler2024-09-051-2/+3
| | | | | | | | | | | | Most of this is copied from `arti_client::err`, but with a lot of stuff removed to simplify the error types (for example no `error_detail` feature handling). I tried to keep things generally consistent with arti-client so that error handling will be similar in both crates. `TorRelayBuilder::create()` will likely need to be fallible in the future (for example if spawning a task for the OR port listener fails), so it now returns a `Result<TorRelay, crate::err::Error>` instead of just a `TorRelay`.
* arti-relay: pass config in `TorRelay::create_inner`Steven Engler2024-09-031-2/+1
|
* relay: Add basic configuration and builderDavid Goulet2024-08-201-0/+33
This adds the basic TorRelayConfig object along a builder in order to create a TorRelay object. At this commit, the configuration object only holds a "StorageConfig" which is a simple starting point which will allow to expand to a KeyMgr and then a ChanMgr along more configuration. There is also no custom Error for the crate at this point. Fixes #1534 Signed-off-by: David Goulet <[email protected]>