mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-04 21:32:39 +08:00

- If present, code will try to filter the CronWorkflows by the label "onepanel.io/workflow-template-uid" - If not present, all CronWorkflows are returned as normal.
97 lines
2.4 KiB
Protocol Buffer
97 lines
2.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/empty.proto";
|
|
import "workflow_template.proto";
|
|
import "workflow.proto";
|
|
import "metric.proto";
|
|
|
|
service CronWorkflowService {
|
|
rpc CreateCronWorkflow (CreateCronWorkflowRequest) returns (CronWorkflow) {
|
|
option (google.api.http) = {
|
|
post: "/apis/v1beta1/{namespace}/cron_workflow"
|
|
body: "cronWorkflow"
|
|
};
|
|
}
|
|
|
|
rpc UpdateCronWorkflow(UpdateCronWorkflowRequest) returns (CronWorkflow) {
|
|
option (google.api.http) = {
|
|
post: "/apis/v1beta1/{namespace}/cron_workflow/{name}"
|
|
body: "cronWorkflow"
|
|
};
|
|
}
|
|
|
|
rpc GetCronWorkflow(GetCronWorkflowRequest) returns (CronWorkflow) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/cron_workflow/{name}"
|
|
};
|
|
}
|
|
|
|
rpc ListCronWorkflows(ListCronWorkflowRequest) returns (ListCronWorkflowsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/apis/v1beta1/{namespace}/cron_workflows"
|
|
additional_bindings {
|
|
get: "/apis/v1beta1/{namespace}/cron_workflows/{workflow_template_uid}"
|
|
}
|
|
};
|
|
}
|
|
|
|
rpc TerminateCronWorkflow (TerminateCronWorkflowRequest) returns (google.protobuf.Empty) {
|
|
option (google.api.http) = {
|
|
delete: "/apis/v1beta1/{namespace}/cron_workflows/{name}/terminate"
|
|
};
|
|
}
|
|
}
|
|
|
|
message TerminateCronWorkflowRequest {
|
|
string namespace = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
|
|
message GetCronWorkflowRequest {
|
|
string namespace = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
message CreateCronWorkflowRequest {
|
|
string namespace = 1;
|
|
CronWorkflow cronWorkflow = 2;
|
|
}
|
|
|
|
message UpdateCronWorkflowRequest {
|
|
string namespace = 1 ;
|
|
string name = 2;
|
|
CronWorkflow cronWorkflow = 3;
|
|
}
|
|
|
|
message ListCronWorkflowRequest {
|
|
string namespace = 1;
|
|
string workflow_template_uid = 2;
|
|
int32 pageSize = 3;
|
|
int32 page = 4;
|
|
}
|
|
|
|
message ListCronWorkflowsResponse {
|
|
int32 count = 1;
|
|
repeated CronWorkflow cronWorkflows = 2;
|
|
int32 page = 3;
|
|
int32 pages = 4;
|
|
int32 totalCount = 5;
|
|
}
|
|
|
|
|
|
message CronWorkflow {
|
|
string name = 1;
|
|
string schedule = 2;
|
|
string timezone = 3;
|
|
bool suspend = 4;
|
|
string concurrencyPolicy = 5;
|
|
int64 startingDeadlineSeconds = 6;
|
|
int32 successfulJobsHistoryLimit = 7;
|
|
int32 failedJobsHistoryLimit = 8;
|
|
|
|
WorkflowExecution workflowExecution = 9;
|
|
} |