ores.scheduler.api

Table of Contents

1. Diagram

ores.scheduler.api component diagram

Figure 1: ores.scheduler.api

2. Summary

ores.scheduler.api is a header-only library defining the shared contract for the scheduler domain. It provides domain types for job definitions (cron expressions, action types), job instances (execution records), and job status values, together with JSON and table I/O via generated codecs, and the NATS protocol schemas consumed by ores.scheduler.core and any client managing scheduled jobs.

Everything the job-definition entity puts on the wire is generated from modeling/ores.scheduler.job_definition.org: the domain type and its JSON, table and table-I/O companions, the entity protocol, the change event, the generator, and the TypeScript projection. The hand-written types here are cron_expression, which is the entity's one custom column type and carries its own text form and stream operator, and the job-instance and job-status types behind the two operational views.

3. Inputs

  • Domain entity type definitions: job_definition.hpp (generated), job_instance.hpp, job_status.hpp, cron_expression.hpp.

4. Outputs

  • C++ headers for scheduler domain types with JSON and table I/O.
  • The canonical entity protocol for job definitions, its change event, and the operation protocol for the job-instance and status views.

5. Entry points

  • include/ores.scheduler.api/domain/ — all domain entity headers.
  • include/ores.scheduler.api/messaging/ — the generated entity protocol and the operation protocol.
  • include/ores.scheduler.api/eventing/ — the generated change event.
  • include/ores.scheduler.api/generators/ — the generated synthetic job-definition generator.

6. Dependencies

  • fort — formatted table rendering.
  • croncpp — cron expression validation and next-occurrence computation.

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}
    PUBLIC
        ores.platform.lib
    PRIVATE
        ores.utility.lib
        faker-cxx::faker-cxx
        libfort::fort)

target_link_libraries(${lib_target_name} PRIVATE ores.codec.pch)
target_link_libraries(${tests_target_name}
    PRIVATE
        ores.scheduler.api.lib
        ores.telemetry.core.lib
        ores.utility.lib
        ores.testing.lib
        faker-cxx::faker-cxx
        Catch2::Catch2
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)