20#ifndef ORES_SCHEDULER_MESSAGING_SCHEDULER_PROTOCOL_HPP
21#define ORES_SCHEDULER_MESSAGING_SCHEDULER_PROTOCOL_HPP
26#include "ores.scheduler.api/domain/job_definition.hpp"
27#include "ores.scheduler.api/domain/job_instance.hpp"
29namespace ores::scheduler::messaging {
31struct get_job_definitions_request {
32 using response_type =
struct get_job_definitions_response;
33 static constexpr std::string_view nats_subject =
34 "scheduler.v1.job-definitions.list";
39struct get_job_definitions_response {
40 std::vector<ores::scheduler::domain::job_definition> definitions;
41 int total_available_count = 0;
44struct schedule_job_request {
45 using response_type =
struct schedule_job_response;
46 static constexpr std::string_view nats_subject =
47 "scheduler.v1.job-definitions.schedule";
49 std::string change_reason_code;
50 std::string change_commentary;
53struct schedule_job_response {
58struct unschedule_job_request {
59 using response_type =
struct unschedule_job_response;
60 static constexpr std::string_view nats_subject =
61 "scheduler.v1.job-definitions.unschedule";
62 std::string job_definition_id;
63 std::string change_reason_code;
64 std::string change_commentary;
67struct unschedule_job_response {
72struct schedule_jobs_batch_request {
73 using response_type =
struct schedule_jobs_batch_response;
74 static constexpr std::string_view nats_subject =
75 "scheduler.v1.job-definitions.schedule-batch";
76 std::vector<ores::scheduler::domain::job_definition> definitions;
77 std::string change_reason_code;
78 std::string change_commentary;
81struct schedule_jobs_batch_response {
84 int scheduled_count = 0;
85 std::vector<std::string> failed_ids;
88struct get_job_history_request {
89 using response_type =
struct get_job_history_response;
90 static constexpr std::string_view nats_subject =
91 "scheduler.v1.job-definitions.history";
92 std::string job_definition_id;
96struct get_job_history_response {
99 std::vector<ores::scheduler::domain::job_instance> instances;
Persistent plan for an in-process scheduled job.
Definition job_definition.hpp:38