• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright 2020 Huawei Technologies Co., Ltd
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto3";
18package mindspore.dataset;
19option cc_enable_arenas = true;
20
21// The session_id and crc work together to uniquely identify this particular cache and allow
22// sharing of the cache.
23message CacheClientInfo {
24  uint32 session_id = 1;
25  uint32 crc = 2;
26}
27
28message CacheRequest {
29  // Type of rpc request
30  int32 type = 1;
31  // Extra optional flag used by individual request if needed
32  uint32 flag = 2;
33  oneof connect_info {
34    // The server_connection_id is the actual id we use for operations after the cache is built
35    uint64 connection_id = 3;
36    // But some request like CreateCache we have to use the session id and crc to connect to the server.
37    CacheClientInfo connection_info = 4;
38  }
39  int32 client_id = 5;
40  // Everything else is just vector of buffers
41  repeated bytes buf_data = 6;
42}
43
44message CacheReply {
45  int32 rc = 1;
46  string msg = 2;
47  // Extra optional flag used by individual request if needed
48  uint32 flag = 3;
49  // What the server send back is a plain buffer
50  bytes result = 4;
51}
52
53service CacheServerGreeter {
54  rpc CacheServerRequest (CacheRequest) returns (CacheReply) {}
55}
56