Skip to content

Move TorClient::create_onion_service into InertTorClient

Summary

create_onion_service is currently an associated function of TorClient. This requires callers to provide a concrete implementor of Runtime, even when it's not meaningfully used.

As a result, the API becomes less ergonomic, as users must supply a potentially arbitrary or redundant runtime instance (see here).

Proposed Change

Move create_onion_service to be an associated function of InertTorClient instead. Since InertTorClient holds configuration state without requiring a live runtime, it may be a more appropriate place for this method.

Consideration

This change may require a discussion about the intended role and responsibilities of InertTorClient.

cc @gabi-250

Edited by hjrgrn