123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- // Copyright 2020 gorse Project 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";
- option go_package = "github.com/zhenghaoz/gorse/protocol";
- package protocol;
- enum NodeType {
- ServerNode = 0;
- WorkerNode = 1;
- ClientNode = 2;
- }
- service Master {
- /* meta distribute */
- rpc GetMeta(NodeInfo) returns (Meta) {}
- /* data distribute */
- rpc GetRankingModel(VersionInfo) returns (stream Fragment) {}
- rpc GetClickModel(VersionInfo) returns (stream Fragment) {}
- rpc PushProgress(PushProgressRequest) returns (PushProgressResponse) {}
- }
- message Meta {
- string config = 1;
- int64 ranking_model_version = 3;
- int64 click_model_version = 4;
- string me = 5;
- repeated string servers = 6;
- repeated string workers = 7;
- }
- message Fragment {
- bytes data = 1;
- }
- message VersionInfo {
- int64 version = 1;
- }
- message NodeInfo {
- NodeType node_type = 1;
- string node_name = 2;
- int64 http_port = 3;
- string binary_version = 4;
- }
- message Progress {
- string tracer = 1;
- string name = 2;
- string status = 3;
- string error = 4;
- int64 count = 5;
- int64 total = 6;
- int64 start_time = 7;
- int64 finish_time = 8;
- }
- message PushProgressRequest {
- repeated Progress progress = 1;
- }
- message PushProgressResponse {}
|