summaryrefslogtreecommitdiff
path: root/proto/jobs/v1beta/jobs.proto
blob: c030c0dfd679ed746b0107582e097b7d96c6997b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
syntax = "proto3";

package jobs.v1beta;
option go_package = "./;jobsv1beta";

// single job request
message PushRequest {
    Job job = 1;
}

// batch jobs request
message PushBatchRequest {
    repeated Job jobs = 1;
}

// request to pause/resume/list/Destroy
message Pipelines {
    repeated string pipelines = 1;
}

// some endpoints receives nothing
// all endpoints returns nothing, except error
message Empty {}

message DeclareRequest {
    map<string, string> pipeline = 1;
}

message Job {
    string job = 1;
    string id = 2;
    string payload = 3;
    map<string, HeaderValue> headers = 4;
    Options options = 5;
}

message Options {
    int64 priority = 1;
    string pipeline = 2;
    int64 delay = 3;
}

message HeaderValue {
    repeated string value = 1;
}

message Stats {
    repeated Stat Stats = 1;
}

// Stat used as a response for the Stats RPC call
message Stat {
    string pipeline = 1;
    string driver = 2;
    string queue = 3;
    int64 active = 4;
    int64 delayed = 5;
    int64 reserved = 6;
    bool ready = 7;
}