pub(crate) async fn connect<R: Runtime>(
connector: &HsClientConnector<R>,
netdir: Arc<NetDir>,
config: Arc<Config>,
hsid: HsId,
data: &mut Data,
secret_keys: HsClientSecretKeys,
) -> Result<Arc<ClientCirc>, ConnError>
Expand description
Actually make a HS connection, updating our recorded state as necessary
connector
is provided only for obtaining the runtime and netdir (and mock_for_state
).
Obviously, connect
is not supposed to go looking in services
.
This function handles all necessary retrying of fallible operations, (and, therefore, must also limit the total work done for a particular call).
This function has a minimum of functionality, since it is the boundary
between “mock connection, used for testing state.rs
” and
“mock circuit and netdir, used for testing connect.rs
”,
so it is not, itself, unit-testable.