• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2022 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto3";
6
7package chromiumos.test.api;
8
9option go_package = "go.chromium.org/chromiumos/config/go/test/api";
10
11// TestLibsService defines interactions with a Test Libs Server.
12service TestLibsService {
13  // StartLib starts a new docker container running for the given library.
14  rpc StartLib(GetLibRequest)
15      returns (GetLibResponse);
16
17  // FindLib connects to an existing docker container (or starts one if no match
18  // is found).
19  rpc FindLib(GetLibRequest)
20      returns (GetLibResponse);
21
22  // KillLib closes a running docker container.
23  rpc KillLib(KillLibRequest)
24      returns (KillLibResponse);
25}
26
27// Get Lib messages.
28message GetLibSuccess {
29  string id = 1;
30  string port = 2;
31}
32
33message GetLibFailure {
34  enum Reason {
35    REASON_UNKNOWN = 0;
36    REASON_UNREGISTERED_LIB = 1;
37    REASON_CONTAINER_START_ERROR = 2;
38  }
39  Reason reason = 1;
40}
41
42message GetLibRequest {
43  string name = 1;
44  string version = 2;
45  repeated string options = 3;
46}
47
48message GetLibResponse {
49  oneof outcome {
50    GetLibSuccess success = 1;
51    GetLibFailure failure = 2;
52  }
53}
54
55// Kill Lib messages.
56message KillLibRequest {
57  string id = 1;
58  string options = 2;
59}
60
61message KillLibResponse {
62}
63