Basic protos for ray client (#11762)

This commit is contained in:
Barak Michener
2020-11-05 16:23:54 -08:00
committed by GitHub
parent f86c4f992c
commit 27c810a97e
9 changed files with 297 additions and 0 deletions
+12
View File
@@ -155,3 +155,15 @@ cc_proto_library(
deps = [":agent_manager_proto"],
)
# Ray Client gRPC lib
proto_library(
name = "ray_client_proto",
srcs = ["ray_client.proto"],
deps = [],
)
python_grpc_compile(
name = "ray_client_py_proto",
deps = [":ray_client_proto"]
)
+67
View File
@@ -0,0 +1,67 @@
// Copyright 2020 The Ray Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package ray.rpc;
enum Type { DEFAULT = 0; }
message Arg {
enum Locality {
INTERNED = 0;
REFERENCE = 1;
}
Locality local = 1;
bytes reference_id = 2;
bytes data = 3;
Type type = 4;
}
message ClientTask {
// Optionally Provided Task Name
string name = 1;
bytes payload_id = 2;
repeated Arg args = 3;
}
message ClientTaskTicket {
bytes return_id = 1;
}
message PutRequest {
bytes data = 1;
}
message PutResponse {
bytes id = 1;
}
message GetRequest {
bytes id = 1;
}
message GetResponse {
bool valid = 1;
bytes data = 2;
}
service RayletDriver {
rpc GetObject(GetRequest) returns (GetResponse) {
}
rpc PutObject(PutRequest) returns (PutResponse) {
}
rpc Schedule(ClientTask) returns (ClientTaskTicket) {
}
}