stub out some initial work and go generate
This commit is contained in:
commit
39385bc8b2
9 changed files with 3343 additions and 0 deletions
3
ray_rpc/client.go
Normal file
3
ray_rpc/client.go
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
package ray_rpc
|
||||
|
||||
//go:generate protoc --proto_path=. --gogoslick_out=plugins=grpc:. ray_client.proto
|
||||
3001
ray_rpc/ray_client.pb.go
Normal file
3001
ray_rpc/ray_client.pb.go
Normal file
File diff suppressed because it is too large
Load diff
86
ray_rpc/ray_client.proto
Normal file
86
ray_rpc/ray_client.proto
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
// 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 {
|
||||
enum RemoteExecType {
|
||||
FUNCTION = 0;
|
||||
ACTOR = 1;
|
||||
METHOD = 2;
|
||||
STATIC_METHOD = 3;
|
||||
}
|
||||
RemoteExecType type = 1;
|
||||
string name = 2;
|
||||
bytes payload_id = 3;
|
||||
repeated Arg args = 4;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
message WaitRequest {
|
||||
repeated bytes object_refs = 1;
|
||||
int64 num_returns = 2;
|
||||
double timeout = 3;
|
||||
}
|
||||
|
||||
message WaitResponse {
|
||||
bool valid = 1;
|
||||
repeated bytes ready_object_ids = 2;
|
||||
repeated bytes remaining_object_ids = 3;
|
||||
}
|
||||
|
||||
service RayletDriver {
|
||||
rpc GetObject(GetRequest) returns (GetResponse) {
|
||||
}
|
||||
rpc PutObject(PutRequest) returns (PutResponse) {
|
||||
}
|
||||
rpc WaitObject(WaitRequest) returns (WaitResponse) {
|
||||
}
|
||||
rpc Schedule(ClientTask) returns (ClientTaskTicket) {
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue