github.com/hashicorp/go-plugin@v1.6.0/test/grpc/test.proto (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  syntax = "proto3";
     5  
     6  package grpctest;
     7  
     8  option go_package = "./grpctest";
     9  
    10  import "google/protobuf/empty.proto";
    11  
    12  message TestRequest {
    13      int32 Input = 1;
    14  }
    15  
    16  message TestResponse {
    17      int32 Output = 2;
    18  }
    19  
    20  message PrintKVRequest {
    21      string Key = 1;
    22      oneof Value {
    23          string ValueString = 2;
    24          int32 ValueInt = 3;
    25      }
    26  }
    27  
    28  message PrintKVResponse {
    29  
    30  }
    31  
    32  message BidirectionalRequest {
    33      uint32 id = 1;
    34  }
    35  
    36  message BidirectionalResponse {
    37      uint32 id = 1;
    38  }
    39  
    40  message PrintStdioRequest {
    41      bytes stdout = 1;
    42      bytes stderr = 2;
    43  }
    44  
    45  service Test {
    46      rpc Double(TestRequest) returns (TestResponse) {}
    47      rpc PrintKV(PrintKVRequest) returns (PrintKVResponse) {}
    48      rpc Bidirectional(BidirectionalRequest) returns (BidirectionalResponse) {}
    49      rpc Stream(stream TestRequest) returns (stream TestResponse) {}
    50      rpc PrintStdio(PrintStdioRequest) returns (google.protobuf.Empty) {}
    51  }
    52  
    53  message PingRequest {
    54  }
    55  
    56  message PongResponse {
    57      string msg = 1;
    58  }
    59  
    60  service PingPong {
    61      rpc Ping(PingRequest) returns (PongResponse) {}
    62  }