• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7//     https://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, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14syntax = "proto3";
15
16package pw.target_runner;
17
18option go_package = "pigweed.dev/proto/pw_target_runner/target_runner_pb";
19
20service TargetRunner {
21  // Queues a single executable, blocking until it has run.
22  rpc RunBinary(RunBinaryRequest) returns (RunBinaryResponse) {}
23
24  // Returns information about the server.
25  rpc Status(Empty) returns (ServerStatus) {}
26}
27
28message Empty {}
29
30enum RunStatus {
31  PENDING = 0;
32  SUCCESS = 1;
33  FAILURE = 2;
34  SKIPPED = 3;
35}
36
37message RunBinaryRequest {
38  // Local file path to the binary.
39  string file_path = 1;
40}
41
42message RunBinaryResponse {
43  RunStatus result = 1;
44  uint64 queue_time_ns = 2;
45  uint64 run_time_ns = 3;
46  bytes output = 4;
47}
48
49message ServerStatus {
50  uint64 uptime_ns = 1;
51  uint32 tasks_queued = 2;
52  uint32 tasks_passed = 3;
53  uint32 tasks_failed = 4;
54}
55