HomePhabricator
Diffusion Comm d837bd2529d9

[services] Tunnelbroker - Updating notifications libraries with the config

Description

[services] Tunnelbroker - Updating notifications libraries with the config

Summary:
This diff introduces the following changes to the internal notifications library:

  • Removing the old FFI return type (we are using it to call the Rust from C++, but now it doesn't needed as we are calling Rust from Rust) and using the Rust native Result instead with the Ok and our custom error types ApnsErrors and FcmErrors because we want to distinguish token-related errors and request the new token from the client later.
  • Using the static CONFIG parameters from the D5641 instead of passing config parameters on every notification-sending call.

Linear task: ENG-1891

Test Plan:

  1. Service is successfully built.
  2. Parameters from the config file successfully passed to the functions.
  3. Returning OK or correct error type in case of the token expiration/or wrong.

Reviewers: jon, tomek, varun

Reviewed By: tomek

Subscribers: ashoat, tomek, atul, abosh

Differential Revision: https://phab.comm.dev/D5642

Details

Provenance
maxAuthored on Nov 16 2022, 3:14 AM
Reviewer
tomek
Differential Revision
D5642: [services] Tunnelbroker - Updating notifications libraries with the config
Parents
rCOMMd22cf359cf99: [services] Tunnelbroker - Notifications config initialization
Branches
Unknown
Tags
Unknown