github.com/nya3jp/tast@v0.0.0-20230601000426-85c8e4d83a9b/src/go.chromium.org/tast/core/internal/protocol/loopback.proto (about)

     1  // Copyright 2021 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  
     5  syntax = "proto3";
     6  
     7  package tast.core;
     8  
     9  option go_package = "go.chromium.org/tast/core/internal/protocol";
    10  
    11  // LoopbackExecService is a protocol used by loopback executables internally.
    12  // See fakeexec package for details.
    13  service LoopbackExecService {
    14    rpc Exec(stream ExecRequest) returns (stream ExecResponse) {}
    15  }
    16  
    17  message ExecRequest {
    18    oneof type {
    19      InitEvent init = 1;
    20      PipeEvent stdin = 2;
    21    }
    22  }
    23  
    24  message ExecResponse {
    25    oneof type {
    26      ExitEvent exit = 1;
    27      PipeEvent stdout = 2;
    28      PipeEvent stderr = 3;
    29    }
    30  }
    31  
    32  message InitEvent { repeated string args = 1; }
    33  
    34  message ExitEvent { int32 code = 1; }
    35  
    36  message PipeEvent {
    37    bytes data = 1;
    38    bool close = 2;
    39  }