ores.refdata.client

Table of Contents

1. Diagram

ores.refdata.client component diagram

Figure 1: ores.refdata.client

2. Summary

ores.refdata.client is a header-only library of consumer-side helpers for reference data. It hosts the convention-aware FX rate formatter used by every rate-display surface, and the currency_pair_convention_cache: an in-process, per-tenant cache of currency-pair conventions loaded over NATS and reloaded on changed events. Its registrar wires the warm-up and the changed-event subscription at service startup. Consumers are the market-data client and the removed market-data plugins. A load carries a Bearer token when the producer checks authorisation; pass an ores.iam.client-style token provider in that case.

3. Inputs

  • Domain types from ores.refdata.api: currency_pair_convention.
  • NATS protocol messages from ores.refdata.api: the read_currency_pair_conventions_for_cache request/response pair and the currency_pair_convention_event.

4. Outputs

  • C++ headers with the rate formatter, the tenant cache, and the cache registrar.

5. Entry points

  • service/cache/currency_pair_convention_cache.hpp — load() and lookup() per tenant.
  • service/cache/currency_pair_convention_cache_registrar.hpp — warm_and_subscribe_currency_pair_convention_cache().
  • presentation/currency_pair_rate_formatter.hpp — format_rate().

6. Dependencies

  • ores.refdata.api — the domain and protocol types.
  • ores.eventing — the changed-event types and the partitioned_cache primitive.
  • ores.nats — the service client and subscription type.
  • ores.logging — logger setup.
  • Optionally, an ores.iam.client token provider for authenticated loads.

7. Build dependencies

What the shared profile cannot know, declared here rather than hand-edited into the generated build file. Each block is spliced into its generated file after the profile's baseline.

8. See also

9. Test dependencies

The suites link what the profile cannot know about.

target_link_libraries(${lib_target_name}
    INTERFACE
        ores.nats.lib
        ores.refdata.api.lib
        ores.eventing.api.lib
        ores.eventing.core.lib
        ores.logging.lib
        ores.utility.lib)
target_link_libraries(${tests_target_name}
    PRIVATE
        ores.refdata.client.lib
        ores.telemetry.core.lib
        ores.utility.lib
        ores.testing.lib
        Catch2::Catch2
        ores.openssl_cleanup
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)