Skip to content

Refactor library RPC implementation of `admire::register_adhoc_storage`

The actual implementation of the RPC should be moved to admire::detail in impl.[ch]pp similarly to admire::register|update|remove_job().

This should include:

  • Input arg job type should be changed to admire::job.
  • Input arg ctx type should be changed to admire::adhoc_storage::context.
  • Output arg adhoc_storage should disappear. Instead, an instance of admire::storage should be returned by the function.
  • Since errors can occur and there's an output arg (adhoc_storage), the return type of the new function should be a tl::expected<admire::storage, admire::error_code>.
  • Updating the C++ examples to fit the new API.

This task also probably requires:

  • Redefining the RPC types for the RPC defined in rpc_types.[ch]pp
  • Using conversion types to manage RPC types without memory leaks.
Edited by Alberto Miranda