Damien Martin-Guillerez | f88f4d8 | 2015-09-25 13:56:55 +0000 | [diff] [blame] | 1 | // Copyright 2015 The Bazel Authors. All rights reserved. |
Philipp Wollermann | 6c5688d | 2015-06-09 12:35:06 +0000 | [diff] [blame] | 2 | // |
| 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 | |
| 15 | syntax = "proto3"; |
| 16 | |
| 17 | package blaze.worker; |
| 18 | |
| 19 | option java_package = "com.google.devtools.build.lib.worker"; |
| 20 | |
Philipp Wollermann | 026de57 | 2015-11-04 20:21:40 +0000 | [diff] [blame] | 21 | // An input file. |
| 22 | message 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 Wollermann | 6c5688d | 2015-06-09 12:35:06 +0000 | [diff] [blame] | 34 | // This represents a single work unit that Blaze sends to the worker. |
| 35 | message WorkRequest { |
| 36 | repeated string arguments = 1; |
Philipp Wollermann | 026de57 | 2015-11-04 20:21:40 +0000 | [diff] [blame] | 37 | |
| 38 | // The inputs that the worker is allowed to read during execution of this |
| 39 | // request. |
| 40 | repeated Input inputs = 2; |
Philipp Wollermann | 6c5688d | 2015-06-09 12:35:06 +0000 | [diff] [blame] | 41 | } |
| 42 | |
| 43 | // The worker sends this message to Blaze when it finished its work on the WorkRequest message. |
| 44 | message WorkResponse { |
| 45 | int32 exit_code = 1; |
Philipp Wollermann | 026de57 | 2015-11-04 20:21:40 +0000 | [diff] [blame] | 46 | |
Philipp Wollermann | 6c5688d | 2015-06-09 12:35:06 +0000 | [diff] [blame] | 47 | // 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 | } |