github.com/s7techlab/cckit@v0.10.5/extensions/crosscc/cclocator_setting.proto (about)

     1  syntax = "proto3";
     2  
     3  option go_package = "github.com/s7techlab/cckit/extensions/crosscc";
     4  package crosscc;
     5  
     6  import "google/protobuf/empty.proto";
     7  import "google/api/annotations.proto";
     8  
     9  service SettingService {
    10  
    11      rpc ServiceLocatorSet (ServiceLocatorSetRequest) returns (ServiceLocator) {
    12          option (google.api.http) = {
    13              post: "/croscc/services"
    14              body: "*"
    15          };
    16      }
    17  
    18      rpc ServiceLocatorGet (ServiceLocatorId) returns (ServiceLocator) {
    19          option (google.api.http) = {
    20              get: "/croscc/{service}"
    21          };
    22      }
    23  
    24      rpc ListServiceLocators (google.protobuf.Empty) returns (ServiceLocators) {
    25          option (google.api.http) = {
    26              get: "/croscc/services"
    27          };
    28      }
    29  
    30      // Try to query chaincodes from service chaincode settings
    31      rpc PingService (ServiceLocatorId) returns (PingServiceResponse) {
    32          option (google.api.http) = {
    33              get: "/croscc/ping/{service}"
    34          };
    35      }
    36  
    37      rpc PingServices (google.protobuf.Empty) returns (PingServiceResponses) {
    38          option (google.api.http) = {
    39              get: "/croscc/ping"
    40          };
    41  
    42      }
    43  
    44  }
    45  
    46  // Request: set service resolving setting
    47  message ServiceLocatorSetRequest {
    48      string service = 1; // service identifier
    49      string channel = 2; // channel id
    50      string chaincode = 3; // chaincode name
    51  }
    52  
    53  // State: ervice resolving setting
    54  message ServiceLocator {
    55      string service = 1; // service identifier
    56      string channel = 2; // channel id
    57      string chaincode = 3; // chaincode name
    58  }
    59  
    60  // Id: service resolving setting identifier
    61  message ServiceLocatorId {
    62      string service = 1; // service identifier
    63  }
    64  
    65  // List: service resolving settings
    66  message ServiceLocators {
    67      repeated ServiceLocator items = 1;
    68  }
    69  
    70  // Event: service resolving settings was set
    71  message ServiceLocatorSet {
    72      string service = 1; // service identifier
    73      string channel = 2; // channel id
    74      string chaincode = 3; // chaincode name
    75  }
    76  
    77  
    78  message PingServiceResponse {
    79      ServiceLocator locator = 1;
    80      string error = 2;
    81  }
    82  
    83  message PingServiceResponses {
    84      repeated PingServiceResponse responses = 1;
    85  }
    86