woodpecker/pipeline/rpc/proto/woodpecker.proto
Harikesh00 36e42914fa
Renamed procs/jobs to steps in code (#1331)
Renamed `procs` to `steps` in code for the issue #1288

Co-authored-by: Harikesh Prajapati <harikesh.prajapati@druva.com>
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
2022-10-28 17:38:53 +02:00

118 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "github.com/woodpecker-ci/woodpecker/pipeline/rpc/proto";
package proto;
message File {
string name = 1;
string step = 2;
string mime = 3;
int64 time = 4;
int32 size = 5;
bytes data = 6;
map<string, string> meta = 7;
}
message State {
string name = 1;
bool exited = 2;
int32 exit_code = 3;
int64 started = 4;
int64 finished = 5;
string error = 6;
}
message Line {
string step = 1;
int64 time = 2;
int32 pos = 3;
string out = 4;
}
message Filter {
map<string, string> labels = 1;
}
message Pipeline {
string id = 1;
int64 timeout = 2;
bytes payload = 3;
}
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
}
ServingStatus status = 1;
}
service Woodpecker {
rpc Next (NextRequest) returns (NextReply) {}
rpc Init (InitRequest) returns (Empty) {}
rpc Wait (WaitRequest) returns (Empty) {}
rpc Done (DoneRequest) returns (Empty) {}
rpc Extend (ExtendRequest) returns (Empty) {}
rpc Update (UpdateRequest) returns (Empty) {}
rpc Upload (UploadRequest) returns (Empty) {}
rpc Log (LogRequest) returns (Empty) {}
}
service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
}
//
// next
//
message NextRequest {
Filter filter = 1;
}
message NextReply {
Pipeline pipeline = 1;
}
message InitRequest {
string id = 1;
State state = 2;
}
message WaitRequest {
string id = 1;
}
message DoneRequest {
string id = 1;
State state = 2;
}
message ExtendRequest {
string id = 1;
}
message UploadRequest {
string id = 1;
File file = 2;
}
message UpdateRequest {
string id = 1;
State state = 2;
}
message LogRequest {
string id = 1;
Line line = 2;
}
message Empty {
}