blob: 4706792f4e78f2c840d808c3ab8ffbe3576cec6a [file] [log] [blame]
Damien Martin-Guillerezf88f4d82015-09-25 13:56:55 +00001// Copyright 2015 The Bazel Authors. All rights reserved.
Philipp Wollermann6c5688d2015-06-09 12:35:06 +00002//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package blaze.worker;
18
19option java_package = "com.google.devtools.build.lib.worker";
20
Philipp Wollermann026de572015-11-04 20:21:40 +000021// An input file.
22message Input {
23 // The path in the file system where to read this input artifact from. This is
24 // either a path relative to the execution root (the worker process is
25 // launched with the working directory set to the execution root), or an
26 // absolute path.
27 string path = 1;
28
29 // A hash-value of the contents. The format of the contents is unspecified and
30 // the digest should be treated as an opaque token.
31 bytes digest = 2;
32}
33
Philipp Wollermann6c5688d2015-06-09 12:35:06 +000034// This represents a single work unit that Blaze sends to the worker.
35message WorkRequest {
36 repeated string arguments = 1;
Philipp Wollermann026de572015-11-04 20:21:40 +000037
38 // The inputs that the worker is allowed to read during execution of this
39 // request.
40 repeated Input inputs = 2;
Philipp Wollermann6c5688d2015-06-09 12:35:06 +000041}
42
43// The worker sends this message to Blaze when it finished its work on the WorkRequest message.
44message WorkResponse {
45 int32 exit_code = 1;
Philipp Wollermann026de572015-11-04 20:21:40 +000046
Philipp Wollermann6c5688d2015-06-09 12:35:06 +000047 // This is printed to the user after the WorkResponse has been received and is supposed to contain
48 // compiler warnings / errors etc. - thus we'll use a string type here, which gives us UTF-8
49 // encoding.
50 string output = 2;
51}