diff --git a/Cargo.lock b/Cargo.lock index 6c23470..6b956b3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -126,6 +126,7 @@ name = "bayard" version = "0.6.0" dependencies = [ "async-std 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bayard-proto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "cang-jie 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -142,7 +143,7 @@ dependencies = [ "num_cpus 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "raft 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "router 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -153,6 +154,17 @@ dependencies = [ "urlencoded 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bayard-proto" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "grpcio 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "raft 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bincode" version = "1.2.1" @@ -705,7 +717,7 @@ dependencies = [ "grpcio-sys 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1307,14 +1319,14 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "protobuf" -version = "2.8.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1337,7 +1349,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2050,6 +2062,7 @@ dependencies = [ "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" +"checksum bayard-proto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f4a20679da696641d9dd2cbdb8c3854f57dbb9608f156bb2bd453ccd370de49" "checksum bincode 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum bitpacking 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3744aff20a3437a99ebc0bb7733e9e60c7bf590478c9b897e95b38d57e5acb68" @@ -2185,7 +2198,7 @@ dependencies = [ "checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" "checksum prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" -"checksum protobuf 2.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8aefcec9f142b524d98fc81d07827743be89dd6586a1ba6ab21fa66a500b3fa5" +"checksum protobuf 2.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6686ddd96a8dbe2687b5f2a687b2cfb520854010ec480f2d74c32e7c9873d3c5" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum raft 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "43648985159f2c4c25f934182a63b0dd4c5cc06a5ae96e5d40e12c3a3785abde" diff --git a/Cargo.toml b/Cargo.toml index 7454ac4..0d7905a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ path = "src/main.rs" [dependencies] async-std = "1.4.0" +bayard-proto = "0.2.0" cang-jie = "0.7.0" clap = "2.33.0" crossbeam-channel = "0.4.0" @@ -38,7 +39,7 @@ logger = "0.4.0" num_cpus = "1.11.1" persistent = "0.4.0" prometheus = "0.7.0" -protobuf = "2.8.0" +protobuf = "2.10.1" raft = "0.4.3" rand = "0.7.2" router = "0.6.0" diff --git a/Makefile b/Makefile index 1436ed4..03ac890 100644 --- a/Makefile +++ b/Makefile @@ -15,12 +15,8 @@ clean: format: cargo fmt -protoc: - ./generate_proto.sh - build: mkdir -p $(BIN_DIR) - cargo update -p protobuf --precise 2.8.0 cargo build --release cp -p ./target/release/bayard $(BIN_DIR) diff --git a/generate_proto.sh b/generate_proto.sh deleted file mode 100755 index b80e159..0000000 --- a/generate_proto.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -push () { - pushd $1 >/dev/null 2>&1 -} - -pop () { - popd $1 >/dev/null 2>&1 -} - -mkdir -p src/proto - -push proto - -protoc --rust_out=../src/proto indexrpcpb.proto -protoc -I. --rust_out=../src/proto --grpc_out=../src/proto --plugin=protoc-gen-grpc=`which grpc_rust_plugin` indexpb.proto - -pop diff --git a/proto/eraftpb.proto b/proto/eraftpb.proto deleted file mode 100644 index 9ea96e7..0000000 --- a/proto/eraftpb.proto +++ /dev/null @@ -1,101 +0,0 @@ -syntax = "proto3"; -package eraftpb; - -enum EntryType { - EntryNormal = 0; - EntryConfChange = 1; -} - -// The entry is a type of change that needs to be applied. It contains two data fields. -// While the fields are built into the model; their usage is determined by the entry_type. -// -// For normal entries, the data field should contain the data change that should be applied. -// The context field can be used for any contextual data that might be relevant to the -// application of the data. -// -// For configuration changes, the data will contain the ConfChange message and the -// context will provide anything needed to assist the configuration change. The context -// if for the user to set and use in this case. -message Entry { - EntryType entry_type = 1; - uint64 term = 2; - uint64 index = 3; - bytes data = 4; - bytes context = 6; - - // Deprecated! It is kept for backward compatibility. - // TODO: remove it in the next major release. - bool sync_log = 5; -} - -message SnapshotMetadata { - ConfState conf_state = 1; - uint64 index = 2; - uint64 term = 3; -} - -message Snapshot { - bytes data = 1; - SnapshotMetadata metadata = 2; -} - -enum MessageType { - MsgHup = 0; - MsgBeat = 1; - MsgPropose = 2; - MsgAppend = 3; - MsgAppendResponse = 4; - MsgRequestVote = 5; - MsgRequestVoteResponse = 6; - MsgSnapshot = 7; - MsgHeartbeat = 8; - MsgHeartbeatResponse = 9; - MsgUnreachable = 10; - MsgSnapStatus = 11; - MsgCheckQuorum = 12; - MsgTransferLeader = 13; - MsgTimeoutNow = 14; - MsgReadIndex = 15; - MsgReadIndexResp = 16; - MsgRequestPreVote = 17; - MsgRequestPreVoteResponse = 18; -} - -message Message { - MessageType msg_type = 1; - uint64 to = 2; - uint64 from = 3; - uint64 term = 4; - uint64 log_term = 5; - uint64 index = 6; - repeated Entry entries = 7; - uint64 commit = 8; - Snapshot snapshot = 9; - bool reject = 10; - uint64 reject_hint = 11; - bytes context = 12; -} - -message HardState { - uint64 term = 1; - uint64 vote = 2; - uint64 commit = 3; -} - -message ConfState { - repeated uint64 nodes = 1; - repeated uint64 learners = 2; -} - -enum ConfChangeType { - AddNode = 0; - RemoveNode = 1; - AddLearnerNode = 2; -} - -message ConfChange { - uint64 id = 1; - ConfChangeType change_type = 2; - uint64 node_id = 3; - bytes context = 4; -} diff --git a/proto/indexpb.proto b/proto/indexpb.proto deleted file mode 100644 index 1333207..0000000 --- a/proto/indexpb.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package indexpb; - -import "indexrpcpb.proto"; -import "eraftpb.proto"; - -service Index { - rpc Raft (eraftpb.Message) returns (indexrpcpb.RaftDone) { - } - rpc RaftConfChange (indexrpcpb.ConfChangeReq) returns (indexrpcpb.RaftDone) { - } - rpc Probe (indexrpcpb.ProbeReq) returns (indexrpcpb.ProbeResp) { - } - rpc Peers (indexrpcpb.PeersReq) returns (indexrpcpb.PeersResp) { - } - rpc Metrics (indexrpcpb.MetricsReq) returns (indexrpcpb.MetricsResp) { - } - rpc Get (indexrpcpb.GetReq) returns (indexrpcpb.GetResp) { - } - rpc Put (indexrpcpb.PutReq) returns (indexrpcpb.PutResp) { - } - rpc Delete (indexrpcpb.DeleteReq) returns (indexrpcpb.DeleteResp) { - } - rpc BulkPut (indexrpcpb.BulkPutReq) returns (indexrpcpb.BulkPutResp) { - } - rpc BulkDelete (indexrpcpb.BulkDeleteReq) returns (indexrpcpb.BulkDeleteResp) { - } - rpc Commit (indexrpcpb.CommitReq) returns (indexrpcpb.CommitResp) { - } - rpc Rollback (indexrpcpb.RollbackReq) returns (indexrpcpb.RollbackResp) { - } - rpc Merge (indexrpcpb.MergeReq) returns (indexrpcpb.MergeResp) { - } - rpc Search (indexrpcpb.SearchReq) returns (indexrpcpb.SearchResp) { - } - rpc Schema (indexrpcpb.SchemaReq) returns (indexrpcpb.SchemaResp) { - } -} diff --git a/proto/indexrpcpb.proto b/proto/indexrpcpb.proto deleted file mode 100644 index 1586203..0000000 --- a/proto/indexrpcpb.proto +++ /dev/null @@ -1,214 +0,0 @@ -syntax = "proto3"; -package indexrpcpb; - -import "eraftpb.proto"; - -enum RespErr { - OK = 0; - ErrWrongLeader = 1; - ErrTimeout = 2; - ErrDisconnected = 3; - ErrProbeFailed = 4; - ErrPeerFailed = 5; - ErrMetricsFailed = 6; - ErrGetFailed = 7; - ErrPutFailed = 8; - ErrDeleteFailed = 9; - ErrBulkPutFailed = 10; - ErrBulkDeleteFailed = 11; - ErrCommitFailed = 12; - ErrRollbackFailed = 13; - ErrMergeFailed = 14; - ErrSearchFailed = 15; - ErrSchemaFailed = 16; -} - -enum ReqType { - Join = 0; - Leave = 1; - Put = 2; - Delete = 3; - BulkPut = 4; - BulkDelete = 5; - Commit = 6; - Rollback = 7; - Merge = 8; -} - -message ApplyReq { - uint64 client_id = 1; - ReqType req_type = 2; - JoinReq join_req = 3; - LeaveReq leave_req = 4; - PutReq put_req = 5; - DeleteReq delete_req = 6; - BulkPutReq bulk_put_req = 7; - BulkDeleteReq bulk_delete_req = 8; - CommitReq commit_req = 9; - RollbackReq rollback_req = 10; - MergeReq merge_req = 11; -} - -message ConfChangeReq { - eraftpb.ConfChange cc = 1; - string ip = 2; - uint32 port = 3; -} - -message RaftDone { - RespErr err = 1; -} - -message JoinReq { - uint64 client_id = 1; - uint64 peer_id = 2; - string peer_addr = 3; -} - -message LeaveReq { - uint64 client_id = 1; - uint64 peer_id = 2; - string peer_addr = 3; -} - -message ProbeReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message ProbeResp { - string value = 1; - RespErr err = 2; -} - -message PeersReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message PeersResp { - string value = 1; - RespErr err = 2; -} - -message MetricsReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message MetricsResp { - string value = 1; - RespErr err = 2; -} - -message GetReq { - uint64 client_id = 1; - uint64 seq = 2; - string doc_id = 3; -} - -message GetResp { - string value = 1; - RespErr err = 2; -} - -message PutReq { - uint64 client_id = 1; - uint64 seq = 2; - string doc = 3; -} - -message PutResp { - string value = 1; - RespErr err = 2; -} - -message DeleteReq { - uint64 client_id = 1; - uint64 seq = 2; - string doc_id = 3; -} - -message DeleteResp { - string value = 1; - RespErr err = 2; -} - -message BulkPutReq { - uint64 client_id = 1; - uint64 seq = 2; - string docs = 3; -} - -message BulkPutResp { - string value = 1; - RespErr err = 2; -} - -message BulkDeleteReq { - uint64 client_id = 1; - uint64 seq = 2; - string docs = 3; -} - -message BulkDeleteResp { - string value = 1; - RespErr err = 2; -} - -message CommitReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message CommitResp { - string value = 1; - RespErr err = 2; -} - -message RollbackReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message RollbackResp { - string value = 1; - RespErr err = 2; -} - -message MergeReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message MergeResp { - string value = 1; - RespErr err = 2; -} - -message SearchReq { - uint64 client_id = 1; - uint64 seq = 2; - string query = 3; - uint64 from = 4; - uint64 limit = 5; - bool exclude_count = 6; - bool exclude_docs = 7; - string facet_field = 8; - repeated string facet_prefixes = 9; -} - -message SearchResp { - string value = 1; - RespErr err = 2; -} - -message SchemaReq { - uint64 client_id = 1; - uint64 seq = 2; -} - -message SchemaResp { - string value = 1; - RespErr err = 2; -} diff --git a/src/client/client.rs b/src/client/client.rs index 5966c31..e9ec70f 100644 --- a/src/client/client.rs +++ b/src/client/client.rs @@ -3,18 +3,17 @@ use std::sync::Arc; use std::thread; use std::time::Duration; -use grpcio::{ChannelBuilder, EnvBuilder}; -use log::*; -use protobuf::RepeatedField; -use raft::eraftpb::{ConfChange, ConfChangeType}; - -use crate::proto::indexpb_grpc::IndexClient; -use crate::proto::indexrpcpb::{ +use bayard_proto::proto::indexpb_grpc::IndexClient; +use bayard_proto::proto::indexrpcpb::{ BulkDeleteReq, BulkDeleteResp, BulkPutReq, BulkPutResp, CommitReq, CommitResp, ConfChangeReq, DeleteReq, DeleteResp, GetReq, GetResp, MergeReq, MergeResp, MetricsReq, MetricsResp, PeersReq, PeersResp, ProbeReq, ProbeResp, PutReq, PutResp, RaftDone, RespErr, RollbackReq, RollbackResp, SchemaReq, SchemaResp, SearchReq, SearchResp, }; +use grpcio::{ChannelBuilder, EnvBuilder}; +use log::*; +use protobuf::RepeatedField; +use raft::eraftpb::{ConfChange, ConfChangeType}; pub fn create_client(addr: &str) -> IndexClient { let env = Arc::new(EnvBuilder::new().build()); diff --git a/src/lib.rs b/src/lib.rs index 6d811a5..db25194 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,11 +1,5 @@ -#![crate_type = "lib"] -extern crate grpcio; -extern crate raft; - pub mod client; pub mod cmd; pub mod server; pub mod tokenizer; pub mod util; - -pub mod proto; diff --git a/src/proto.rs b/src/proto.rs deleted file mode 100644 index b00715f..0000000 --- a/src/proto.rs +++ /dev/null @@ -1,10 +0,0 @@ -extern crate futures; -extern crate grpcio; -extern crate protobuf; -extern crate raft; - -use raft::eraftpb; - -pub mod indexpb; -pub mod indexpb_grpc; -pub mod indexrpcpb; diff --git a/src/proto/indexpb.rs b/src/proto/indexpb.rs deleted file mode 100644 index 7807565..0000000 --- a/src/proto/indexpb.rs +++ /dev/null @@ -1,108 +0,0 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `indexpb.proto` - -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\rindexpb.proto\x12\x07indexpb\x1a\x10indexrpcpb.proto\x1a\reraftpb.pr\ - oto2\xfa\x06\n\x05Index\x120\n\x04Raft\x12\x10.eraftpb.Message\x1a\x14.i\ - ndexrpcpb.RaftDone\"\0\x12C\n\x0eRaftConfChange\x12\x19.indexrpcpb.ConfC\ - hangeReq\x1a\x14.indexrpcpb.RaftDone\"\0\x126\n\x05Probe\x12\x14.indexrp\ - cpb.ProbeReq\x1a\x15.indexrpcpb.ProbeResp\"\0\x126\n\x05Peers\x12\x14.in\ - dexrpcpb.PeersReq\x1a\x15.indexrpcpb.PeersResp\"\0\x12<\n\x07Metrics\x12\ - \x16.indexrpcpb.MetricsReq\x1a\x17.indexrpcpb.MetricsResp\"\0\x120\n\x03\ - Get\x12\x12.indexrpcpb.GetReq\x1a\x13.indexrpcpb.GetResp\"\0\x120\n\x03P\ - ut\x12\x12.indexrpcpb.PutReq\x1a\x13.indexrpcpb.PutResp\"\0\x129\n\x06De\ - lete\x12\x15.indexrpcpb.DeleteReq\x1a\x16.indexrpcpb.DeleteResp\"\0\x12<\ - \n\x07BulkPut\x12\x16.indexrpcpb.BulkPutReq\x1a\x17.indexrpcpb.BulkPutRe\ - sp\"\0\x12E\n\nBulkDelete\x12\x19.indexrpcpb.BulkDeleteReq\x1a\x1a.index\ - rpcpb.BulkDeleteResp\"\0\x129\n\x06Commit\x12\x15.indexrpcpb.CommitReq\ - \x1a\x16.indexrpcpb.CommitResp\"\0\x12?\n\x08Rollback\x12\x17.indexrpcpb\ - .RollbackReq\x1a\x18.indexrpcpb.RollbackResp\"\0\x126\n\x05Merge\x12\x14\ - .indexrpcpb.MergeReq\x1a\x15.indexrpcpb.MergeResp\"\0\x129\n\x06Search\ - \x12\x15.indexrpcpb.SearchReq\x1a\x16.indexrpcpb.SearchResp\"\0\x129\n\ - \x06Schema\x12\x15.indexrpcpb.SchemaReq\x1a\x16.indexrpcpb.SchemaResp\"\ - \0J\x92\x07\n\x06\x12\x04\0\0%\x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\ - \n\x01\x02\x12\x03\x01\0\x10\n\t\n\x02\x03\0\x12\x03\x03\0\x1a\n\t\n\x02\ - \x03\x01\x12\x03\x04\0\x17\n\n\n\x02\x06\0\x12\x04\x06\0%\x01\n\n\n\x03\ - \x06\0\x01\x12\x03\x06\x08\r\n\x0c\n\x04\x06\0\x02\0\x12\x04\x07\x04\x08\ - \x05\n\x0c\n\x05\x06\0\x02\0\x01\x12\x03\x07\x08\x0c\n\x0c\n\x05\x06\0\ - \x02\0\x02\x12\x03\x07\x0e\x1d\n\x0c\n\x05\x06\0\x02\0\x03\x12\x03\x07(;\ - \n\x0c\n\x04\x06\0\x02\x01\x12\x04\t\x04\n\x05\n\x0c\n\x05\x06\0\x02\x01\ - \x01\x12\x03\t\x08\x16\n\x0c\n\x05\x06\0\x02\x01\x02\x12\x03\t\x180\n\ - \x0c\n\x05\x06\0\x02\x01\x03\x12\x03\t;N\n\x0c\n\x04\x06\0\x02\x02\x12\ - \x04\x0b\x04\x0c\x05\n\x0c\n\x05\x06\0\x02\x02\x01\x12\x03\x0b\x08\r\n\ - \x0c\n\x05\x06\0\x02\x02\x02\x12\x03\x0b\x0f\"\n\x0c\n\x05\x06\0\x02\x02\ - \x03\x12\x03\x0b-A\n\x0c\n\x04\x06\0\x02\x03\x12\x04\r\x04\x0e\x05\n\x0c\ - \n\x05\x06\0\x02\x03\x01\x12\x03\r\x08\r\n\x0c\n\x05\x06\0\x02\x03\x02\ - \x12\x03\r\x0f\"\n\x0c\n\x05\x06\0\x02\x03\x03\x12\x03\r-A\n\x0c\n\x04\ - \x06\0\x02\x04\x12\x04\x0f\x04\x10\x05\n\x0c\n\x05\x06\0\x02\x04\x01\x12\ - \x03\x0f\x08\x0f\n\x0c\n\x05\x06\0\x02\x04\x02\x12\x03\x0f\x11&\n\x0c\n\ - \x05\x06\0\x02\x04\x03\x12\x03\x0f1G\n\x0c\n\x04\x06\0\x02\x05\x12\x04\ - \x11\x04\x12\x05\n\x0c\n\x05\x06\0\x02\x05\x01\x12\x03\x11\x08\x0b\n\x0c\ - \n\x05\x06\0\x02\x05\x02\x12\x03\x11\r\x1e\n\x0c\n\x05\x06\0\x02\x05\x03\ - \x12\x03\x11);\n\x0c\n\x04\x06\0\x02\x06\x12\x04\x13\x04\x14\x05\n\x0c\n\ - \x05\x06\0\x02\x06\x01\x12\x03\x13\x08\x0b\n\x0c\n\x05\x06\0\x02\x06\x02\ - \x12\x03\x13\r\x1e\n\x0c\n\x05\x06\0\x02\x06\x03\x12\x03\x13);\n\x0c\n\ - \x04\x06\0\x02\x07\x12\x04\x15\x04\x16\x05\n\x0c\n\x05\x06\0\x02\x07\x01\ - \x12\x03\x15\x08\x0e\n\x0c\n\x05\x06\0\x02\x07\x02\x12\x03\x15\x10$\n\ - \x0c\n\x05\x06\0\x02\x07\x03\x12\x03\x15/D\n\x0c\n\x04\x06\0\x02\x08\x12\ - \x04\x17\x04\x18\x05\n\x0c\n\x05\x06\0\x02\x08\x01\x12\x03\x17\x08\x0f\n\ - \x0c\n\x05\x06\0\x02\x08\x02\x12\x03\x17\x11&\n\x0c\n\x05\x06\0\x02\x08\ - \x03\x12\x03\x171G\n\x0c\n\x04\x06\0\x02\t\x12\x04\x19\x04\x1a\x05\n\x0c\ - \n\x05\x06\0\x02\t\x01\x12\x03\x19\x08\x12\n\x0c\n\x05\x06\0\x02\t\x02\ - \x12\x03\x19\x14,\n\x0c\n\x05\x06\0\x02\t\x03\x12\x03\x197P\n\x0c\n\x04\ - \x06\0\x02\n\x12\x04\x1b\x04\x1c\x05\n\x0c\n\x05\x06\0\x02\n\x01\x12\x03\ - \x1b\x08\x0e\n\x0c\n\x05\x06\0\x02\n\x02\x12\x03\x1b\x10$\n\x0c\n\x05\ - \x06\0\x02\n\x03\x12\x03\x1b/D\n\x0c\n\x04\x06\0\x02\x0b\x12\x04\x1d\x04\ - \x1e\x05\n\x0c\n\x05\x06\0\x02\x0b\x01\x12\x03\x1d\x08\x10\n\x0c\n\x05\ - \x06\0\x02\x0b\x02\x12\x03\x1d\x12(\n\x0c\n\x05\x06\0\x02\x0b\x03\x12\ - \x03\x1d3J\n\x0c\n\x04\x06\0\x02\x0c\x12\x04\x1f\x04\x20\x05\n\x0c\n\x05\ - \x06\0\x02\x0c\x01\x12\x03\x1f\x08\r\n\x0c\n\x05\x06\0\x02\x0c\x02\x12\ - \x03\x1f\x0f\"\n\x0c\n\x05\x06\0\x02\x0c\x03\x12\x03\x1f-A\n\x0c\n\x04\ - \x06\0\x02\r\x12\x04!\x04\"\x05\n\x0c\n\x05\x06\0\x02\r\x01\x12\x03!\x08\ - \x0e\n\x0c\n\x05\x06\0\x02\r\x02\x12\x03!\x10$\n\x0c\n\x05\x06\0\x02\r\ - \x03\x12\x03!/D\n\x0c\n\x04\x06\0\x02\x0e\x12\x04#\x04$\x05\n\x0c\n\x05\ - \x06\0\x02\x0e\x01\x12\x03#\x08\x0e\n\x0c\n\x05\x06\0\x02\x0e\x02\x12\ - \x03#\x10$\n\x0c\n\x05\x06\0\x02\x0e\x03\x12\x03#/Db\x06proto3\ -"; - -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto, -}; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() -} - -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } -} diff --git a/src/proto/indexpb_grpc.rs b/src/proto/indexpb_grpc.rs deleted file mode 100644 index 476fcd7..0000000 --- a/src/proto/indexpb_grpc.rs +++ /dev/null @@ -1,463 +0,0 @@ -// This file is generated. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] - -const METHOD_INDEX_RAFT: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Raft", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_RAFT_CONF_CHANGE: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/RaftConfChange", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_PROBE: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Probe", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_PEERS: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Peers", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_METRICS: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Metrics", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_GET: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Get", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_PUT: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Put", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_DELETE: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Delete", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_BULK_PUT: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/BulkPut", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_BULK_DELETE: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/BulkDelete", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_COMMIT: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Commit", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_ROLLBACK: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Rollback", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_MERGE: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Merge", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_SEARCH: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Search", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -const METHOD_INDEX_SCHEMA: ::grpcio::Method = ::grpcio::Method { - ty: ::grpcio::MethodType::Unary, - name: "/indexpb.Index/Schema", - req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, - resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de }, -}; - -#[derive(Clone)] -pub struct IndexClient { - client: ::grpcio::Client, -} - -impl IndexClient { - pub fn new(channel: ::grpcio::Channel) -> Self { - IndexClient { - client: ::grpcio::Client::new(channel), - } - } - - pub fn raft_opt(&self, req: &super::eraftpb::Message, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_RAFT, req, opt) - } - - pub fn raft(&self, req: &super::eraftpb::Message) -> ::grpcio::Result { - self.raft_opt(req, ::grpcio::CallOption::default()) - } - - pub fn raft_async_opt(&self, req: &super::eraftpb::Message, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_RAFT, req, opt) - } - - pub fn raft_async(&self, req: &super::eraftpb::Message) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.raft_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn raft_conf_change_opt(&self, req: &super::indexrpcpb::ConfChangeReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_RAFT_CONF_CHANGE, req, opt) - } - - pub fn raft_conf_change(&self, req: &super::indexrpcpb::ConfChangeReq) -> ::grpcio::Result { - self.raft_conf_change_opt(req, ::grpcio::CallOption::default()) - } - - pub fn raft_conf_change_async_opt(&self, req: &super::indexrpcpb::ConfChangeReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_RAFT_CONF_CHANGE, req, opt) - } - - pub fn raft_conf_change_async(&self, req: &super::indexrpcpb::ConfChangeReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.raft_conf_change_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn probe_opt(&self, req: &super::indexrpcpb::ProbeReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_PROBE, req, opt) - } - - pub fn probe(&self, req: &super::indexrpcpb::ProbeReq) -> ::grpcio::Result { - self.probe_opt(req, ::grpcio::CallOption::default()) - } - - pub fn probe_async_opt(&self, req: &super::indexrpcpb::ProbeReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_PROBE, req, opt) - } - - pub fn probe_async(&self, req: &super::indexrpcpb::ProbeReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.probe_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn peers_opt(&self, req: &super::indexrpcpb::PeersReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_PEERS, req, opt) - } - - pub fn peers(&self, req: &super::indexrpcpb::PeersReq) -> ::grpcio::Result { - self.peers_opt(req, ::grpcio::CallOption::default()) - } - - pub fn peers_async_opt(&self, req: &super::indexrpcpb::PeersReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_PEERS, req, opt) - } - - pub fn peers_async(&self, req: &super::indexrpcpb::PeersReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.peers_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn metrics_opt(&self, req: &super::indexrpcpb::MetricsReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_METRICS, req, opt) - } - - pub fn metrics(&self, req: &super::indexrpcpb::MetricsReq) -> ::grpcio::Result { - self.metrics_opt(req, ::grpcio::CallOption::default()) - } - - pub fn metrics_async_opt(&self, req: &super::indexrpcpb::MetricsReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_METRICS, req, opt) - } - - pub fn metrics_async(&self, req: &super::indexrpcpb::MetricsReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.metrics_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn get_opt(&self, req: &super::indexrpcpb::GetReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_GET, req, opt) - } - - pub fn get(&self, req: &super::indexrpcpb::GetReq) -> ::grpcio::Result { - self.get_opt(req, ::grpcio::CallOption::default()) - } - - pub fn get_async_opt(&self, req: &super::indexrpcpb::GetReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_GET, req, opt) - } - - pub fn get_async(&self, req: &super::indexrpcpb::GetReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.get_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn put_opt(&self, req: &super::indexrpcpb::PutReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_PUT, req, opt) - } - - pub fn put(&self, req: &super::indexrpcpb::PutReq) -> ::grpcio::Result { - self.put_opt(req, ::grpcio::CallOption::default()) - } - - pub fn put_async_opt(&self, req: &super::indexrpcpb::PutReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_PUT, req, opt) - } - - pub fn put_async(&self, req: &super::indexrpcpb::PutReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.put_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn delete_opt(&self, req: &super::indexrpcpb::DeleteReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_DELETE, req, opt) - } - - pub fn delete(&self, req: &super::indexrpcpb::DeleteReq) -> ::grpcio::Result { - self.delete_opt(req, ::grpcio::CallOption::default()) - } - - pub fn delete_async_opt(&self, req: &super::indexrpcpb::DeleteReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_DELETE, req, opt) - } - - pub fn delete_async(&self, req: &super::indexrpcpb::DeleteReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.delete_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn bulk_put_opt(&self, req: &super::indexrpcpb::BulkPutReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_BULK_PUT, req, opt) - } - - pub fn bulk_put(&self, req: &super::indexrpcpb::BulkPutReq) -> ::grpcio::Result { - self.bulk_put_opt(req, ::grpcio::CallOption::default()) - } - - pub fn bulk_put_async_opt(&self, req: &super::indexrpcpb::BulkPutReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_BULK_PUT, req, opt) - } - - pub fn bulk_put_async(&self, req: &super::indexrpcpb::BulkPutReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.bulk_put_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn bulk_delete_opt(&self, req: &super::indexrpcpb::BulkDeleteReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_BULK_DELETE, req, opt) - } - - pub fn bulk_delete(&self, req: &super::indexrpcpb::BulkDeleteReq) -> ::grpcio::Result { - self.bulk_delete_opt(req, ::grpcio::CallOption::default()) - } - - pub fn bulk_delete_async_opt(&self, req: &super::indexrpcpb::BulkDeleteReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_BULK_DELETE, req, opt) - } - - pub fn bulk_delete_async(&self, req: &super::indexrpcpb::BulkDeleteReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.bulk_delete_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn commit_opt(&self, req: &super::indexrpcpb::CommitReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_COMMIT, req, opt) - } - - pub fn commit(&self, req: &super::indexrpcpb::CommitReq) -> ::grpcio::Result { - self.commit_opt(req, ::grpcio::CallOption::default()) - } - - pub fn commit_async_opt(&self, req: &super::indexrpcpb::CommitReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_COMMIT, req, opt) - } - - pub fn commit_async(&self, req: &super::indexrpcpb::CommitReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.commit_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn rollback_opt(&self, req: &super::indexrpcpb::RollbackReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_ROLLBACK, req, opt) - } - - pub fn rollback(&self, req: &super::indexrpcpb::RollbackReq) -> ::grpcio::Result { - self.rollback_opt(req, ::grpcio::CallOption::default()) - } - - pub fn rollback_async_opt(&self, req: &super::indexrpcpb::RollbackReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_ROLLBACK, req, opt) - } - - pub fn rollback_async(&self, req: &super::indexrpcpb::RollbackReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.rollback_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn merge_opt(&self, req: &super::indexrpcpb::MergeReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_MERGE, req, opt) - } - - pub fn merge(&self, req: &super::indexrpcpb::MergeReq) -> ::grpcio::Result { - self.merge_opt(req, ::grpcio::CallOption::default()) - } - - pub fn merge_async_opt(&self, req: &super::indexrpcpb::MergeReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_MERGE, req, opt) - } - - pub fn merge_async(&self, req: &super::indexrpcpb::MergeReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.merge_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn search_opt(&self, req: &super::indexrpcpb::SearchReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_SEARCH, req, opt) - } - - pub fn search(&self, req: &super::indexrpcpb::SearchReq) -> ::grpcio::Result { - self.search_opt(req, ::grpcio::CallOption::default()) - } - - pub fn search_async_opt(&self, req: &super::indexrpcpb::SearchReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_SEARCH, req, opt) - } - - pub fn search_async(&self, req: &super::indexrpcpb::SearchReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.search_async_opt(req, ::grpcio::CallOption::default()) - } - - pub fn schema_opt(&self, req: &super::indexrpcpb::SchemaReq, opt: ::grpcio::CallOption) -> ::grpcio::Result { - self.client.unary_call(&METHOD_INDEX_SCHEMA, req, opt) - } - - pub fn schema(&self, req: &super::indexrpcpb::SchemaReq) -> ::grpcio::Result { - self.schema_opt(req, ::grpcio::CallOption::default()) - } - - pub fn schema_async_opt(&self, req: &super::indexrpcpb::SchemaReq, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.client.unary_call_async(&METHOD_INDEX_SCHEMA, req, opt) - } - - pub fn schema_async(&self, req: &super::indexrpcpb::SchemaReq) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver> { - self.schema_async_opt(req, ::grpcio::CallOption::default()) - } - pub fn spawn(&self, f: F) where F: ::futures::Future + Send + 'static { - self.client.spawn(f) - } -} - -pub trait Index { - fn raft(&mut self, ctx: ::grpcio::RpcContext, req: super::eraftpb::Message, sink: ::grpcio::UnarySink); - fn raft_conf_change(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::ConfChangeReq, sink: ::grpcio::UnarySink); - fn probe(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::ProbeReq, sink: ::grpcio::UnarySink); - fn peers(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::PeersReq, sink: ::grpcio::UnarySink); - fn metrics(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::MetricsReq, sink: ::grpcio::UnarySink); - fn get(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::GetReq, sink: ::grpcio::UnarySink); - fn put(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::PutReq, sink: ::grpcio::UnarySink); - fn delete(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::DeleteReq, sink: ::grpcio::UnarySink); - fn bulk_put(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::BulkPutReq, sink: ::grpcio::UnarySink); - fn bulk_delete(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::BulkDeleteReq, sink: ::grpcio::UnarySink); - fn commit(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::CommitReq, sink: ::grpcio::UnarySink); - fn rollback(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::RollbackReq, sink: ::grpcio::UnarySink); - fn merge(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::MergeReq, sink: ::grpcio::UnarySink); - fn search(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::SearchReq, sink: ::grpcio::UnarySink); - fn schema(&mut self, ctx: ::grpcio::RpcContext, req: super::indexrpcpb::SchemaReq, sink: ::grpcio::UnarySink); -} - -pub fn create_index(s: S) -> ::grpcio::Service { - let mut builder = ::grpcio::ServiceBuilder::new(); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_RAFT, move |ctx, req, resp| { - instance.raft(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_RAFT_CONF_CHANGE, move |ctx, req, resp| { - instance.raft_conf_change(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_PROBE, move |ctx, req, resp| { - instance.probe(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_PEERS, move |ctx, req, resp| { - instance.peers(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_METRICS, move |ctx, req, resp| { - instance.metrics(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_GET, move |ctx, req, resp| { - instance.get(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_PUT, move |ctx, req, resp| { - instance.put(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_DELETE, move |ctx, req, resp| { - instance.delete(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_BULK_PUT, move |ctx, req, resp| { - instance.bulk_put(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_BULK_DELETE, move |ctx, req, resp| { - instance.bulk_delete(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_COMMIT, move |ctx, req, resp| { - instance.commit(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_ROLLBACK, move |ctx, req, resp| { - instance.rollback(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_MERGE, move |ctx, req, resp| { - instance.merge(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_SEARCH, move |ctx, req, resp| { - instance.search(ctx, req, resp) - }); - let mut instance = s.clone(); - builder = builder.add_unary_handler(&METHOD_INDEX_SCHEMA, move |ctx, req, resp| { - instance.schema(ctx, req, resp) - }); - builder.build() -} diff --git a/src/proto/indexrpcpb.rs b/src/proto/indexrpcpb.rs deleted file mode 100644 index c4570c1..0000000 --- a/src/proto/indexrpcpb.rs +++ /dev/null @@ -1,7945 +0,0 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit -// @generated - -// https://github.com/Manishearth/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![cfg_attr(rustfmt, rustfmt_skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unsafe_code)] -#![allow(unused_imports)] -#![allow(unused_results)] -//! Generated file from `indexrpcpb.proto` - -use protobuf::Message as Message_imported_for_functions; -use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions; - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0; - -#[derive(PartialEq,Clone,Default)] -pub struct ApplyReq { - // message fields - pub client_id: u64, - pub req_type: ReqType, - pub join_req: ::protobuf::SingularPtrField, - pub leave_req: ::protobuf::SingularPtrField, - pub put_req: ::protobuf::SingularPtrField, - pub delete_req: ::protobuf::SingularPtrField, - pub bulk_put_req: ::protobuf::SingularPtrField, - pub bulk_delete_req: ::protobuf::SingularPtrField, - pub commit_req: ::protobuf::SingularPtrField, - pub rollback_req: ::protobuf::SingularPtrField, - pub merge_req: ::protobuf::SingularPtrField, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ApplyReq { - fn default() -> &'a ApplyReq { - ::default_instance() - } -} - -impl ApplyReq { - pub fn new() -> ApplyReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // .indexrpcpb.ReqType req_type = 2; - - - pub fn get_req_type(&self) -> ReqType { - self.req_type - } - pub fn clear_req_type(&mut self) { - self.req_type = ReqType::Join; - } - - // Param is passed by value, moved - pub fn set_req_type(&mut self, v: ReqType) { - self.req_type = v; - } - - // .indexrpcpb.JoinReq join_req = 3; - - - pub fn get_join_req(&self) -> &JoinReq { - self.join_req.as_ref().unwrap_or_else(|| JoinReq::default_instance()) - } - pub fn clear_join_req(&mut self) { - self.join_req.clear(); - } - - pub fn has_join_req(&self) -> bool { - self.join_req.is_some() - } - - // Param is passed by value, moved - pub fn set_join_req(&mut self, v: JoinReq) { - self.join_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_join_req(&mut self) -> &mut JoinReq { - if self.join_req.is_none() { - self.join_req.set_default(); - } - self.join_req.as_mut().unwrap() - } - - // Take field - pub fn take_join_req(&mut self) -> JoinReq { - self.join_req.take().unwrap_or_else(|| JoinReq::new()) - } - - // .indexrpcpb.LeaveReq leave_req = 4; - - - pub fn get_leave_req(&self) -> &LeaveReq { - self.leave_req.as_ref().unwrap_or_else(|| LeaveReq::default_instance()) - } - pub fn clear_leave_req(&mut self) { - self.leave_req.clear(); - } - - pub fn has_leave_req(&self) -> bool { - self.leave_req.is_some() - } - - // Param is passed by value, moved - pub fn set_leave_req(&mut self, v: LeaveReq) { - self.leave_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_leave_req(&mut self) -> &mut LeaveReq { - if self.leave_req.is_none() { - self.leave_req.set_default(); - } - self.leave_req.as_mut().unwrap() - } - - // Take field - pub fn take_leave_req(&mut self) -> LeaveReq { - self.leave_req.take().unwrap_or_else(|| LeaveReq::new()) - } - - // .indexrpcpb.PutReq put_req = 5; - - - pub fn get_put_req(&self) -> &PutReq { - self.put_req.as_ref().unwrap_or_else(|| PutReq::default_instance()) - } - pub fn clear_put_req(&mut self) { - self.put_req.clear(); - } - - pub fn has_put_req(&self) -> bool { - self.put_req.is_some() - } - - // Param is passed by value, moved - pub fn set_put_req(&mut self, v: PutReq) { - self.put_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_put_req(&mut self) -> &mut PutReq { - if self.put_req.is_none() { - self.put_req.set_default(); - } - self.put_req.as_mut().unwrap() - } - - // Take field - pub fn take_put_req(&mut self) -> PutReq { - self.put_req.take().unwrap_or_else(|| PutReq::new()) - } - - // .indexrpcpb.DeleteReq delete_req = 6; - - - pub fn get_delete_req(&self) -> &DeleteReq { - self.delete_req.as_ref().unwrap_or_else(|| DeleteReq::default_instance()) - } - pub fn clear_delete_req(&mut self) { - self.delete_req.clear(); - } - - pub fn has_delete_req(&self) -> bool { - self.delete_req.is_some() - } - - // Param is passed by value, moved - pub fn set_delete_req(&mut self, v: DeleteReq) { - self.delete_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_delete_req(&mut self) -> &mut DeleteReq { - if self.delete_req.is_none() { - self.delete_req.set_default(); - } - self.delete_req.as_mut().unwrap() - } - - // Take field - pub fn take_delete_req(&mut self) -> DeleteReq { - self.delete_req.take().unwrap_or_else(|| DeleteReq::new()) - } - - // .indexrpcpb.BulkPutReq bulk_put_req = 7; - - - pub fn get_bulk_put_req(&self) -> &BulkPutReq { - self.bulk_put_req.as_ref().unwrap_or_else(|| BulkPutReq::default_instance()) - } - pub fn clear_bulk_put_req(&mut self) { - self.bulk_put_req.clear(); - } - - pub fn has_bulk_put_req(&self) -> bool { - self.bulk_put_req.is_some() - } - - // Param is passed by value, moved - pub fn set_bulk_put_req(&mut self, v: BulkPutReq) { - self.bulk_put_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bulk_put_req(&mut self) -> &mut BulkPutReq { - if self.bulk_put_req.is_none() { - self.bulk_put_req.set_default(); - } - self.bulk_put_req.as_mut().unwrap() - } - - // Take field - pub fn take_bulk_put_req(&mut self) -> BulkPutReq { - self.bulk_put_req.take().unwrap_or_else(|| BulkPutReq::new()) - } - - // .indexrpcpb.BulkDeleteReq bulk_delete_req = 8; - - - pub fn get_bulk_delete_req(&self) -> &BulkDeleteReq { - self.bulk_delete_req.as_ref().unwrap_or_else(|| BulkDeleteReq::default_instance()) - } - pub fn clear_bulk_delete_req(&mut self) { - self.bulk_delete_req.clear(); - } - - pub fn has_bulk_delete_req(&self) -> bool { - self.bulk_delete_req.is_some() - } - - // Param is passed by value, moved - pub fn set_bulk_delete_req(&mut self, v: BulkDeleteReq) { - self.bulk_delete_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bulk_delete_req(&mut self) -> &mut BulkDeleteReq { - if self.bulk_delete_req.is_none() { - self.bulk_delete_req.set_default(); - } - self.bulk_delete_req.as_mut().unwrap() - } - - // Take field - pub fn take_bulk_delete_req(&mut self) -> BulkDeleteReq { - self.bulk_delete_req.take().unwrap_or_else(|| BulkDeleteReq::new()) - } - - // .indexrpcpb.CommitReq commit_req = 9; - - - pub fn get_commit_req(&self) -> &CommitReq { - self.commit_req.as_ref().unwrap_or_else(|| CommitReq::default_instance()) - } - pub fn clear_commit_req(&mut self) { - self.commit_req.clear(); - } - - pub fn has_commit_req(&self) -> bool { - self.commit_req.is_some() - } - - // Param is passed by value, moved - pub fn set_commit_req(&mut self, v: CommitReq) { - self.commit_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_commit_req(&mut self) -> &mut CommitReq { - if self.commit_req.is_none() { - self.commit_req.set_default(); - } - self.commit_req.as_mut().unwrap() - } - - // Take field - pub fn take_commit_req(&mut self) -> CommitReq { - self.commit_req.take().unwrap_or_else(|| CommitReq::new()) - } - - // .indexrpcpb.RollbackReq rollback_req = 10; - - - pub fn get_rollback_req(&self) -> &RollbackReq { - self.rollback_req.as_ref().unwrap_or_else(|| RollbackReq::default_instance()) - } - pub fn clear_rollback_req(&mut self) { - self.rollback_req.clear(); - } - - pub fn has_rollback_req(&self) -> bool { - self.rollback_req.is_some() - } - - // Param is passed by value, moved - pub fn set_rollback_req(&mut self, v: RollbackReq) { - self.rollback_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_rollback_req(&mut self) -> &mut RollbackReq { - if self.rollback_req.is_none() { - self.rollback_req.set_default(); - } - self.rollback_req.as_mut().unwrap() - } - - // Take field - pub fn take_rollback_req(&mut self) -> RollbackReq { - self.rollback_req.take().unwrap_or_else(|| RollbackReq::new()) - } - - // .indexrpcpb.MergeReq merge_req = 11; - - - pub fn get_merge_req(&self) -> &MergeReq { - self.merge_req.as_ref().unwrap_or_else(|| MergeReq::default_instance()) - } - pub fn clear_merge_req(&mut self) { - self.merge_req.clear(); - } - - pub fn has_merge_req(&self) -> bool { - self.merge_req.is_some() - } - - // Param is passed by value, moved - pub fn set_merge_req(&mut self, v: MergeReq) { - self.merge_req = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_merge_req(&mut self) -> &mut MergeReq { - if self.merge_req.is_none() { - self.merge_req.set_default(); - } - self.merge_req.as_mut().unwrap() - } - - // Take field - pub fn take_merge_req(&mut self) -> MergeReq { - self.merge_req.take().unwrap_or_else(|| MergeReq::new()) - } -} - -impl ::protobuf::Message for ApplyReq { - fn is_initialized(&self) -> bool { - for v in &self.join_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.leave_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.put_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.delete_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.bulk_put_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.bulk_delete_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.commit_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.rollback_req { - if !v.is_initialized() { - return false; - } - }; - for v in &self.merge_req { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.req_type, 2, &mut self.unknown_fields)? - }, - 3 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.join_req)?; - }, - 4 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.leave_req)?; - }, - 5 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.put_req)?; - }, - 6 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.delete_req)?; - }, - 7 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.bulk_put_req)?; - }, - 8 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.bulk_delete_req)?; - }, - 9 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.commit_req)?; - }, - 10 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.rollback_req)?; - }, - 11 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.merge_req)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.req_type != ReqType::Join { - my_size += ::protobuf::rt::enum_size(2, self.req_type); - } - if let Some(ref v) = self.join_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.leave_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.put_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.delete_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.bulk_put_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.bulk_delete_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.commit_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.rollback_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if let Some(ref v) = self.merge_req.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.req_type != ReqType::Join { - os.write_enum(2, self.req_type.value())?; - } - if let Some(ref v) = self.join_req.as_ref() { - os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.leave_req.as_ref() { - os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.put_req.as_ref() { - os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.delete_req.as_ref() { - os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.bulk_put_req.as_ref() { - os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.bulk_delete_req.as_ref() { - os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.commit_req.as_ref() { - os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.rollback_req.as_ref() { - os.write_tag(10, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if let Some(ref v) = self.merge_req.as_ref() { - os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ApplyReq { - ApplyReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &ApplyReq| { &m.client_id }, - |m: &mut ApplyReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "req_type", - |m: &ApplyReq| { &m.req_type }, - |m: &mut ApplyReq| { &mut m.req_type }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "join_req", - |m: &ApplyReq| { &m.join_req }, - |m: &mut ApplyReq| { &mut m.join_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "leave_req", - |m: &ApplyReq| { &m.leave_req }, - |m: &mut ApplyReq| { &mut m.leave_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "put_req", - |m: &ApplyReq| { &m.put_req }, - |m: &mut ApplyReq| { &mut m.put_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "delete_req", - |m: &ApplyReq| { &m.delete_req }, - |m: &mut ApplyReq| { &mut m.delete_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "bulk_put_req", - |m: &ApplyReq| { &m.bulk_put_req }, - |m: &mut ApplyReq| { &mut m.bulk_put_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "bulk_delete_req", - |m: &ApplyReq| { &m.bulk_delete_req }, - |m: &mut ApplyReq| { &mut m.bulk_delete_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "commit_req", - |m: &ApplyReq| { &m.commit_req }, - |m: &mut ApplyReq| { &mut m.commit_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "rollback_req", - |m: &ApplyReq| { &m.rollback_req }, - |m: &mut ApplyReq| { &mut m.rollback_req }, - )); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "merge_req", - |m: &ApplyReq| { &m.merge_req }, - |m: &mut ApplyReq| { &mut m.merge_req }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ApplyReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static ApplyReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ApplyReq, - }; - unsafe { - instance.get(ApplyReq::new) - } - } -} - -impl ::protobuf::Clear for ApplyReq { - fn clear(&mut self) { - self.client_id = 0; - self.req_type = ReqType::Join; - self.join_req.clear(); - self.leave_req.clear(); - self.put_req.clear(); - self.delete_req.clear(); - self.bulk_put_req.clear(); - self.bulk_delete_req.clear(); - self.commit_req.clear(); - self.rollback_req.clear(); - self.merge_req.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ApplyReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ApplyReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct ConfChangeReq { - // message fields - pub cc: ::protobuf::SingularPtrField, - pub ip: ::std::string::String, - pub port: u32, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ConfChangeReq { - fn default() -> &'a ConfChangeReq { - ::default_instance() - } -} - -impl ConfChangeReq { - pub fn new() -> ConfChangeReq { - ::std::default::Default::default() - } - - // .eraftpb.ConfChange cc = 1; - - - pub fn get_cc(&self) -> &super::eraftpb::ConfChange { - self.cc.as_ref().unwrap_or_else(|| super::eraftpb::ConfChange::default_instance()) - } - pub fn clear_cc(&mut self) { - self.cc.clear(); - } - - pub fn has_cc(&self) -> bool { - self.cc.is_some() - } - - // Param is passed by value, moved - pub fn set_cc(&mut self, v: super::eraftpb::ConfChange) { - self.cc = ::protobuf::SingularPtrField::some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_cc(&mut self) -> &mut super::eraftpb::ConfChange { - if self.cc.is_none() { - self.cc.set_default(); - } - self.cc.as_mut().unwrap() - } - - // Take field - pub fn take_cc(&mut self) -> super::eraftpb::ConfChange { - self.cc.take().unwrap_or_else(|| super::eraftpb::ConfChange::new()) - } - - // string ip = 2; - - - pub fn get_ip(&self) -> &str { - &self.ip - } - pub fn clear_ip(&mut self) { - self.ip.clear(); - } - - // Param is passed by value, moved - pub fn set_ip(&mut self, v: ::std::string::String) { - self.ip = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_ip(&mut self) -> &mut ::std::string::String { - &mut self.ip - } - - // Take field - pub fn take_ip(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.ip, ::std::string::String::new()) - } - - // uint32 port = 3; - - - pub fn get_port(&self) -> u32 { - self.port - } - pub fn clear_port(&mut self) { - self.port = 0; - } - - // Param is passed by value, moved - pub fn set_port(&mut self, v: u32) { - self.port = v; - } -} - -impl ::protobuf::Message for ConfChangeReq { - fn is_initialized(&self) -> bool { - for v in &self.cc { - if !v.is_initialized() { - return false; - } - }; - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cc)?; - }, - 2 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.ip)?; - }, - 3 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint32()?; - self.port = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if let Some(ref v) = self.cc.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; - } - if !self.ip.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.ip); - } - if self.port != 0 { - my_size += ::protobuf::rt::value_size(3, self.port, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if let Some(ref v) = self.cc.as_ref() { - os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; - os.write_raw_varint32(v.get_cached_size())?; - v.write_to_with_cached_sizes(os)?; - } - if !self.ip.is_empty() { - os.write_string(2, &self.ip)?; - } - if self.port != 0 { - os.write_uint32(3, self.port)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ConfChangeReq { - ConfChangeReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage>( - "cc", - |m: &ConfChangeReq| { &m.cc }, - |m: &mut ConfChangeReq| { &mut m.cc }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "ip", - |m: &ConfChangeReq| { &m.ip }, - |m: &mut ConfChangeReq| { &mut m.ip }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint32>( - "port", - |m: &ConfChangeReq| { &m.port }, - |m: &mut ConfChangeReq| { &mut m.port }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ConfChangeReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static ConfChangeReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ConfChangeReq, - }; - unsafe { - instance.get(ConfChangeReq::new) - } - } -} - -impl ::protobuf::Clear for ConfChangeReq { - fn clear(&mut self) { - self.cc.clear(); - self.ip.clear(); - self.port = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ConfChangeReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ConfChangeReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct RaftDone { - // message fields - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RaftDone { - fn default() -> &'a RaftDone { - ::default_instance() - } -} - -impl RaftDone { - pub fn new() -> RaftDone { - ::std::default::Default::default() - } - - // .indexrpcpb.RespErr err = 1; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for RaftDone { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 1, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(1, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.err != RespErr::OK { - os.write_enum(1, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> RaftDone { - RaftDone::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &RaftDone| { &m.err }, - |m: &mut RaftDone| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "RaftDone", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static RaftDone { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const RaftDone, - }; - unsafe { - instance.get(RaftDone::new) - } - } -} - -impl ::protobuf::Clear for RaftDone { - fn clear(&mut self) { - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for RaftDone { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RaftDone { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct JoinReq { - // message fields - pub client_id: u64, - pub peer_id: u64, - pub peer_addr: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a JoinReq { - fn default() -> &'a JoinReq { - ::default_instance() - } -} - -impl JoinReq { - pub fn new() -> JoinReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 peer_id = 2; - - - pub fn get_peer_id(&self) -> u64 { - self.peer_id - } - pub fn clear_peer_id(&mut self) { - self.peer_id = 0; - } - - // Param is passed by value, moved - pub fn set_peer_id(&mut self, v: u64) { - self.peer_id = v; - } - - // string peer_addr = 3; - - - pub fn get_peer_addr(&self) -> &str { - &self.peer_addr - } - pub fn clear_peer_addr(&mut self) { - self.peer_addr.clear(); - } - - // Param is passed by value, moved - pub fn set_peer_addr(&mut self, v: ::std::string::String) { - self.peer_addr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_peer_addr(&mut self) -> &mut ::std::string::String { - &mut self.peer_addr - } - - // Take field - pub fn take_peer_addr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.peer_addr, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for JoinReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.peer_id = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.peer_addr)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.peer_id != 0 { - my_size += ::protobuf::rt::value_size(2, self.peer_id, ::protobuf::wire_format::WireTypeVarint); - } - if !self.peer_addr.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.peer_addr); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.peer_id != 0 { - os.write_uint64(2, self.peer_id)?; - } - if !self.peer_addr.is_empty() { - os.write_string(3, &self.peer_addr)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> JoinReq { - JoinReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &JoinReq| { &m.client_id }, - |m: &mut JoinReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "peer_id", - |m: &JoinReq| { &m.peer_id }, - |m: &mut JoinReq| { &mut m.peer_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "peer_addr", - |m: &JoinReq| { &m.peer_addr }, - |m: &mut JoinReq| { &mut m.peer_addr }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "JoinReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static JoinReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const JoinReq, - }; - unsafe { - instance.get(JoinReq::new) - } - } -} - -impl ::protobuf::Clear for JoinReq { - fn clear(&mut self) { - self.client_id = 0; - self.peer_id = 0; - self.peer_addr.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for JoinReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for JoinReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct LeaveReq { - // message fields - pub client_id: u64, - pub peer_id: u64, - pub peer_addr: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a LeaveReq { - fn default() -> &'a LeaveReq { - ::default_instance() - } -} - -impl LeaveReq { - pub fn new() -> LeaveReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 peer_id = 2; - - - pub fn get_peer_id(&self) -> u64 { - self.peer_id - } - pub fn clear_peer_id(&mut self) { - self.peer_id = 0; - } - - // Param is passed by value, moved - pub fn set_peer_id(&mut self, v: u64) { - self.peer_id = v; - } - - // string peer_addr = 3; - - - pub fn get_peer_addr(&self) -> &str { - &self.peer_addr - } - pub fn clear_peer_addr(&mut self) { - self.peer_addr.clear(); - } - - // Param is passed by value, moved - pub fn set_peer_addr(&mut self, v: ::std::string::String) { - self.peer_addr = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_peer_addr(&mut self) -> &mut ::std::string::String { - &mut self.peer_addr - } - - // Take field - pub fn take_peer_addr(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.peer_addr, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for LeaveReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.peer_id = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.peer_addr)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.peer_id != 0 { - my_size += ::protobuf::rt::value_size(2, self.peer_id, ::protobuf::wire_format::WireTypeVarint); - } - if !self.peer_addr.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.peer_addr); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.peer_id != 0 { - os.write_uint64(2, self.peer_id)?; - } - if !self.peer_addr.is_empty() { - os.write_string(3, &self.peer_addr)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> LeaveReq { - LeaveReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &LeaveReq| { &m.client_id }, - |m: &mut LeaveReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "peer_id", - |m: &LeaveReq| { &m.peer_id }, - |m: &mut LeaveReq| { &mut m.peer_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "peer_addr", - |m: &LeaveReq| { &m.peer_addr }, - |m: &mut LeaveReq| { &mut m.peer_addr }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "LeaveReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static LeaveReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const LeaveReq, - }; - unsafe { - instance.get(LeaveReq::new) - } - } -} - -impl ::protobuf::Clear for LeaveReq { - fn clear(&mut self) { - self.client_id = 0; - self.peer_id = 0; - self.peer_addr.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for LeaveReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for LeaveReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct ProbeReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ProbeReq { - fn default() -> &'a ProbeReq { - ::default_instance() - } -} - -impl ProbeReq { - pub fn new() -> ProbeReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for ProbeReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ProbeReq { - ProbeReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &ProbeReq| { &m.client_id }, - |m: &mut ProbeReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &ProbeReq| { &m.seq }, - |m: &mut ProbeReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ProbeReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static ProbeReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ProbeReq, - }; - unsafe { - instance.get(ProbeReq::new) - } - } -} - -impl ::protobuf::Clear for ProbeReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ProbeReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ProbeReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct ProbeResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a ProbeResp { - fn default() -> &'a ProbeResp { - ::default_instance() - } -} - -impl ProbeResp { - pub fn new() -> ProbeResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for ProbeResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> ProbeResp { - ProbeResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &ProbeResp| { &m.value }, - |m: &mut ProbeResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &ProbeResp| { &m.err }, - |m: &mut ProbeResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "ProbeResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static ProbeResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ProbeResp, - }; - unsafe { - instance.get(ProbeResp::new) - } - } -} - -impl ::protobuf::Clear for ProbeResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for ProbeResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for ProbeResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct PeersReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PeersReq { - fn default() -> &'a PeersReq { - ::default_instance() - } -} - -impl PeersReq { - pub fn new() -> PeersReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for PeersReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PeersReq { - PeersReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &PeersReq| { &m.client_id }, - |m: &mut PeersReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &PeersReq| { &m.seq }, - |m: &mut PeersReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "PeersReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static PeersReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const PeersReq, - }; - unsafe { - instance.get(PeersReq::new) - } - } -} - -impl ::protobuf::Clear for PeersReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for PeersReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PeersReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct PeersResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PeersResp { - fn default() -> &'a PeersResp { - ::default_instance() - } -} - -impl PeersResp { - pub fn new() -> PeersResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for PeersResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PeersResp { - PeersResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &PeersResp| { &m.value }, - |m: &mut PeersResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &PeersResp| { &m.err }, - |m: &mut PeersResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "PeersResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static PeersResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const PeersResp, - }; - unsafe { - instance.get(PeersResp::new) - } - } -} - -impl ::protobuf::Clear for PeersResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for PeersResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PeersResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct MetricsReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MetricsReq { - fn default() -> &'a MetricsReq { - ::default_instance() - } -} - -impl MetricsReq { - pub fn new() -> MetricsReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for MetricsReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MetricsReq { - MetricsReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &MetricsReq| { &m.client_id }, - |m: &mut MetricsReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &MetricsReq| { &m.seq }, - |m: &mut MetricsReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "MetricsReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static MetricsReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const MetricsReq, - }; - unsafe { - instance.get(MetricsReq::new) - } - } -} - -impl ::protobuf::Clear for MetricsReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for MetricsReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MetricsReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct MetricsResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MetricsResp { - fn default() -> &'a MetricsResp { - ::default_instance() - } -} - -impl MetricsResp { - pub fn new() -> MetricsResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for MetricsResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MetricsResp { - MetricsResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &MetricsResp| { &m.value }, - |m: &mut MetricsResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &MetricsResp| { &m.err }, - |m: &mut MetricsResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "MetricsResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static MetricsResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const MetricsResp, - }; - unsafe { - instance.get(MetricsResp::new) - } - } -} - -impl ::protobuf::Clear for MetricsResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for MetricsResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MetricsResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct GetReq { - // message fields - pub client_id: u64, - pub seq: u64, - pub doc_id: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a GetReq { - fn default() -> &'a GetReq { - ::default_instance() - } -} - -impl GetReq { - pub fn new() -> GetReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } - - // string doc_id = 3; - - - pub fn get_doc_id(&self) -> &str { - &self.doc_id - } - pub fn clear_doc_id(&mut self) { - self.doc_id.clear(); - } - - // Param is passed by value, moved - pub fn set_doc_id(&mut self, v: ::std::string::String) { - self.doc_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_doc_id(&mut self) -> &mut ::std::string::String { - &mut self.doc_id - } - - // Take field - pub fn take_doc_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.doc_id, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for GetReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - if !self.doc_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.doc_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - if !self.doc_id.is_empty() { - os.write_string(3, &self.doc_id)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> GetReq { - GetReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &GetReq| { &m.client_id }, - |m: &mut GetReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &GetReq| { &m.seq }, - |m: &mut GetReq| { &mut m.seq }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "doc_id", - |m: &GetReq| { &m.doc_id }, - |m: &mut GetReq| { &mut m.doc_id }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "GetReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static GetReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const GetReq, - }; - unsafe { - instance.get(GetReq::new) - } - } -} - -impl ::protobuf::Clear for GetReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.doc_id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for GetReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for GetReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct GetResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a GetResp { - fn default() -> &'a GetResp { - ::default_instance() - } -} - -impl GetResp { - pub fn new() -> GetResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for GetResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> GetResp { - GetResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &GetResp| { &m.value }, - |m: &mut GetResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &GetResp| { &m.err }, - |m: &mut GetResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "GetResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static GetResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const GetResp, - }; - unsafe { - instance.get(GetResp::new) - } - } -} - -impl ::protobuf::Clear for GetResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for GetResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for GetResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct PutReq { - // message fields - pub client_id: u64, - pub seq: u64, - pub doc: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PutReq { - fn default() -> &'a PutReq { - ::default_instance() - } -} - -impl PutReq { - pub fn new() -> PutReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } - - // string doc = 3; - - - pub fn get_doc(&self) -> &str { - &self.doc - } - pub fn clear_doc(&mut self) { - self.doc.clear(); - } - - // Param is passed by value, moved - pub fn set_doc(&mut self, v: ::std::string::String) { - self.doc = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_doc(&mut self) -> &mut ::std::string::String { - &mut self.doc - } - - // Take field - pub fn take_doc(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.doc, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for PutReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - if !self.doc.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.doc); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - if !self.doc.is_empty() { - os.write_string(3, &self.doc)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PutReq { - PutReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &PutReq| { &m.client_id }, - |m: &mut PutReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &PutReq| { &m.seq }, - |m: &mut PutReq| { &mut m.seq }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "doc", - |m: &PutReq| { &m.doc }, - |m: &mut PutReq| { &mut m.doc }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "PutReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static PutReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const PutReq, - }; - unsafe { - instance.get(PutReq::new) - } - } -} - -impl ::protobuf::Clear for PutReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.doc.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for PutReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PutReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct PutResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a PutResp { - fn default() -> &'a PutResp { - ::default_instance() - } -} - -impl PutResp { - pub fn new() -> PutResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for PutResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> PutResp { - PutResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &PutResp| { &m.value }, - |m: &mut PutResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &PutResp| { &m.err }, - |m: &mut PutResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "PutResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static PutResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const PutResp, - }; - unsafe { - instance.get(PutResp::new) - } - } -} - -impl ::protobuf::Clear for PutResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for PutResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for PutResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct DeleteReq { - // message fields - pub client_id: u64, - pub seq: u64, - pub doc_id: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DeleteReq { - fn default() -> &'a DeleteReq { - ::default_instance() - } -} - -impl DeleteReq { - pub fn new() -> DeleteReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } - - // string doc_id = 3; - - - pub fn get_doc_id(&self) -> &str { - &self.doc_id - } - pub fn clear_doc_id(&mut self) { - self.doc_id.clear(); - } - - // Param is passed by value, moved - pub fn set_doc_id(&mut self, v: ::std::string::String) { - self.doc_id = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_doc_id(&mut self) -> &mut ::std::string::String { - &mut self.doc_id - } - - // Take field - pub fn take_doc_id(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.doc_id, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for DeleteReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.doc_id)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - if !self.doc_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.doc_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - if !self.doc_id.is_empty() { - os.write_string(3, &self.doc_id)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DeleteReq { - DeleteReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &DeleteReq| { &m.client_id }, - |m: &mut DeleteReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &DeleteReq| { &m.seq }, - |m: &mut DeleteReq| { &mut m.seq }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "doc_id", - |m: &DeleteReq| { &m.doc_id }, - |m: &mut DeleteReq| { &mut m.doc_id }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "DeleteReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static DeleteReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const DeleteReq, - }; - unsafe { - instance.get(DeleteReq::new) - } - } -} - -impl ::protobuf::Clear for DeleteReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.doc_id.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for DeleteReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for DeleteReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct DeleteResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a DeleteResp { - fn default() -> &'a DeleteResp { - ::default_instance() - } -} - -impl DeleteResp { - pub fn new() -> DeleteResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for DeleteResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> DeleteResp { - DeleteResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &DeleteResp| { &m.value }, - |m: &mut DeleteResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &DeleteResp| { &m.err }, - |m: &mut DeleteResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "DeleteResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static DeleteResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const DeleteResp, - }; - unsafe { - instance.get(DeleteResp::new) - } - } -} - -impl ::protobuf::Clear for DeleteResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for DeleteResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for DeleteResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct BulkPutReq { - // message fields - pub client_id: u64, - pub seq: u64, - pub docs: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BulkPutReq { - fn default() -> &'a BulkPutReq { - ::default_instance() - } -} - -impl BulkPutReq { - pub fn new() -> BulkPutReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } - - // string docs = 3; - - - pub fn get_docs(&self) -> &str { - &self.docs - } - pub fn clear_docs(&mut self) { - self.docs.clear(); - } - - // Param is passed by value, moved - pub fn set_docs(&mut self, v: ::std::string::String) { - self.docs = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_docs(&mut self) -> &mut ::std::string::String { - &mut self.docs - } - - // Take field - pub fn take_docs(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.docs, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for BulkPutReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.docs)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - if !self.docs.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.docs); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - if !self.docs.is_empty() { - os.write_string(3, &self.docs)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BulkPutReq { - BulkPutReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &BulkPutReq| { &m.client_id }, - |m: &mut BulkPutReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &BulkPutReq| { &m.seq }, - |m: &mut BulkPutReq| { &mut m.seq }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "docs", - |m: &BulkPutReq| { &m.docs }, - |m: &mut BulkPutReq| { &mut m.docs }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "BulkPutReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static BulkPutReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const BulkPutReq, - }; - unsafe { - instance.get(BulkPutReq::new) - } - } -} - -impl ::protobuf::Clear for BulkPutReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.docs.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for BulkPutReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BulkPutReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct BulkPutResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BulkPutResp { - fn default() -> &'a BulkPutResp { - ::default_instance() - } -} - -impl BulkPutResp { - pub fn new() -> BulkPutResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for BulkPutResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BulkPutResp { - BulkPutResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &BulkPutResp| { &m.value }, - |m: &mut BulkPutResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &BulkPutResp| { &m.err }, - |m: &mut BulkPutResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "BulkPutResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static BulkPutResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const BulkPutResp, - }; - unsafe { - instance.get(BulkPutResp::new) - } - } -} - -impl ::protobuf::Clear for BulkPutResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for BulkPutResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BulkPutResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct BulkDeleteReq { - // message fields - pub client_id: u64, - pub seq: u64, - pub docs: ::std::string::String, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BulkDeleteReq { - fn default() -> &'a BulkDeleteReq { - ::default_instance() - } -} - -impl BulkDeleteReq { - pub fn new() -> BulkDeleteReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } - - // string docs = 3; - - - pub fn get_docs(&self) -> &str { - &self.docs - } - pub fn clear_docs(&mut self) { - self.docs.clear(); - } - - // Param is passed by value, moved - pub fn set_docs(&mut self, v: ::std::string::String) { - self.docs = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_docs(&mut self) -> &mut ::std::string::String { - &mut self.docs - } - - // Take field - pub fn take_docs(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.docs, ::std::string::String::new()) - } -} - -impl ::protobuf::Message for BulkDeleteReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.docs)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - if !self.docs.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.docs); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - if !self.docs.is_empty() { - os.write_string(3, &self.docs)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BulkDeleteReq { - BulkDeleteReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &BulkDeleteReq| { &m.client_id }, - |m: &mut BulkDeleteReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &BulkDeleteReq| { &m.seq }, - |m: &mut BulkDeleteReq| { &mut m.seq }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "docs", - |m: &BulkDeleteReq| { &m.docs }, - |m: &mut BulkDeleteReq| { &mut m.docs }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "BulkDeleteReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static BulkDeleteReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const BulkDeleteReq, - }; - unsafe { - instance.get(BulkDeleteReq::new) - } - } -} - -impl ::protobuf::Clear for BulkDeleteReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.docs.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for BulkDeleteReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BulkDeleteReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct BulkDeleteResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a BulkDeleteResp { - fn default() -> &'a BulkDeleteResp { - ::default_instance() - } -} - -impl BulkDeleteResp { - pub fn new() -> BulkDeleteResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for BulkDeleteResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> BulkDeleteResp { - BulkDeleteResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &BulkDeleteResp| { &m.value }, - |m: &mut BulkDeleteResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &BulkDeleteResp| { &m.err }, - |m: &mut BulkDeleteResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "BulkDeleteResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static BulkDeleteResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const BulkDeleteResp, - }; - unsafe { - instance.get(BulkDeleteResp::new) - } - } -} - -impl ::protobuf::Clear for BulkDeleteResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for BulkDeleteResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for BulkDeleteResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct CommitReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CommitReq { - fn default() -> &'a CommitReq { - ::default_instance() - } -} - -impl CommitReq { - pub fn new() -> CommitReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for CommitReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CommitReq { - CommitReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &CommitReq| { &m.client_id }, - |m: &mut CommitReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &CommitReq| { &m.seq }, - |m: &mut CommitReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "CommitReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static CommitReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const CommitReq, - }; - unsafe { - instance.get(CommitReq::new) - } - } -} - -impl ::protobuf::Clear for CommitReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CommitReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CommitReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct CommitResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a CommitResp { - fn default() -> &'a CommitResp { - ::default_instance() - } -} - -impl CommitResp { - pub fn new() -> CommitResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for CommitResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> CommitResp { - CommitResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &CommitResp| { &m.value }, - |m: &mut CommitResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &CommitResp| { &m.err }, - |m: &mut CommitResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "CommitResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static CommitResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const CommitResp, - }; - unsafe { - instance.get(CommitResp::new) - } - } -} - -impl ::protobuf::Clear for CommitResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for CommitResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for CommitResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct RollbackReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RollbackReq { - fn default() -> &'a RollbackReq { - ::default_instance() - } -} - -impl RollbackReq { - pub fn new() -> RollbackReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for RollbackReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> RollbackReq { - RollbackReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &RollbackReq| { &m.client_id }, - |m: &mut RollbackReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &RollbackReq| { &m.seq }, - |m: &mut RollbackReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "RollbackReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static RollbackReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const RollbackReq, - }; - unsafe { - instance.get(RollbackReq::new) - } - } -} - -impl ::protobuf::Clear for RollbackReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for RollbackReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RollbackReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct RollbackResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a RollbackResp { - fn default() -> &'a RollbackResp { - ::default_instance() - } -} - -impl RollbackResp { - pub fn new() -> RollbackResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for RollbackResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> RollbackResp { - RollbackResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &RollbackResp| { &m.value }, - |m: &mut RollbackResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &RollbackResp| { &m.err }, - |m: &mut RollbackResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "RollbackResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static RollbackResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const RollbackResp, - }; - unsafe { - instance.get(RollbackResp::new) - } - } -} - -impl ::protobuf::Clear for RollbackResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for RollbackResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for RollbackResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct MergeReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MergeReq { - fn default() -> &'a MergeReq { - ::default_instance() - } -} - -impl MergeReq { - pub fn new() -> MergeReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for MergeReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MergeReq { - MergeReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &MergeReq| { &m.client_id }, - |m: &mut MergeReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &MergeReq| { &m.seq }, - |m: &mut MergeReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "MergeReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static MergeReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const MergeReq, - }; - unsafe { - instance.get(MergeReq::new) - } - } -} - -impl ::protobuf::Clear for MergeReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for MergeReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MergeReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct MergeResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a MergeResp { - fn default() -> &'a MergeResp { - ::default_instance() - } -} - -impl MergeResp { - pub fn new() -> MergeResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for MergeResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> MergeResp { - MergeResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &MergeResp| { &m.value }, - |m: &mut MergeResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &MergeResp| { &m.err }, - |m: &mut MergeResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "MergeResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static MergeResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const MergeResp, - }; - unsafe { - instance.get(MergeResp::new) - } - } -} - -impl ::protobuf::Clear for MergeResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for MergeResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for MergeResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct SearchReq { - // message fields - pub client_id: u64, - pub seq: u64, - pub query: ::std::string::String, - pub from: u64, - pub limit: u64, - pub exclude_count: bool, - pub exclude_docs: bool, - pub facet_field: ::std::string::String, - pub facet_prefixes: ::protobuf::RepeatedField<::std::string::String>, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SearchReq { - fn default() -> &'a SearchReq { - ::default_instance() - } -} - -impl SearchReq { - pub fn new() -> SearchReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } - - // string query = 3; - - - pub fn get_query(&self) -> &str { - &self.query - } - pub fn clear_query(&mut self) { - self.query.clear(); - } - - // Param is passed by value, moved - pub fn set_query(&mut self, v: ::std::string::String) { - self.query = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_query(&mut self) -> &mut ::std::string::String { - &mut self.query - } - - // Take field - pub fn take_query(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.query, ::std::string::String::new()) - } - - // uint64 from = 4; - - - pub fn get_from(&self) -> u64 { - self.from - } - pub fn clear_from(&mut self) { - self.from = 0; - } - - // Param is passed by value, moved - pub fn set_from(&mut self, v: u64) { - self.from = v; - } - - // uint64 limit = 5; - - - pub fn get_limit(&self) -> u64 { - self.limit - } - pub fn clear_limit(&mut self) { - self.limit = 0; - } - - // Param is passed by value, moved - pub fn set_limit(&mut self, v: u64) { - self.limit = v; - } - - // bool exclude_count = 6; - - - pub fn get_exclude_count(&self) -> bool { - self.exclude_count - } - pub fn clear_exclude_count(&mut self) { - self.exclude_count = false; - } - - // Param is passed by value, moved - pub fn set_exclude_count(&mut self, v: bool) { - self.exclude_count = v; - } - - // bool exclude_docs = 7; - - - pub fn get_exclude_docs(&self) -> bool { - self.exclude_docs - } - pub fn clear_exclude_docs(&mut self) { - self.exclude_docs = false; - } - - // Param is passed by value, moved - pub fn set_exclude_docs(&mut self, v: bool) { - self.exclude_docs = v; - } - - // string facet_field = 8; - - - pub fn get_facet_field(&self) -> &str { - &self.facet_field - } - pub fn clear_facet_field(&mut self) { - self.facet_field.clear(); - } - - // Param is passed by value, moved - pub fn set_facet_field(&mut self, v: ::std::string::String) { - self.facet_field = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_facet_field(&mut self) -> &mut ::std::string::String { - &mut self.facet_field - } - - // Take field - pub fn take_facet_field(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.facet_field, ::std::string::String::new()) - } - - // repeated string facet_prefixes = 9; - - - pub fn get_facet_prefixes(&self) -> &[::std::string::String] { - &self.facet_prefixes - } - pub fn clear_facet_prefixes(&mut self) { - self.facet_prefixes.clear(); - } - - // Param is passed by value, moved - pub fn set_facet_prefixes(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { - self.facet_prefixes = v; - } - - // Mutable pointer to the field. - pub fn mut_facet_prefixes(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { - &mut self.facet_prefixes - } - - // Take field - pub fn take_facet_prefixes(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { - ::std::mem::replace(&mut self.facet_prefixes, ::protobuf::RepeatedField::new()) - } -} - -impl ::protobuf::Message for SearchReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - 3 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.query)?; - }, - 4 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.from = tmp; - }, - 5 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.limit = tmp; - }, - 6 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.exclude_count = tmp; - }, - 7 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_bool()?; - self.exclude_docs = tmp; - }, - 8 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.facet_field)?; - }, - 9 => { - ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.facet_prefixes)?; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - if !self.query.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.query); - } - if self.from != 0 { - my_size += ::protobuf::rt::value_size(4, self.from, ::protobuf::wire_format::WireTypeVarint); - } - if self.limit != 0 { - my_size += ::protobuf::rt::value_size(5, self.limit, ::protobuf::wire_format::WireTypeVarint); - } - if self.exclude_count != false { - my_size += 2; - } - if self.exclude_docs != false { - my_size += 2; - } - if !self.facet_field.is_empty() { - my_size += ::protobuf::rt::string_size(8, &self.facet_field); - } - for value in &self.facet_prefixes { - my_size += ::protobuf::rt::string_size(9, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - if !self.query.is_empty() { - os.write_string(3, &self.query)?; - } - if self.from != 0 { - os.write_uint64(4, self.from)?; - } - if self.limit != 0 { - os.write_uint64(5, self.limit)?; - } - if self.exclude_count != false { - os.write_bool(6, self.exclude_count)?; - } - if self.exclude_docs != false { - os.write_bool(7, self.exclude_docs)?; - } - if !self.facet_field.is_empty() { - os.write_string(8, &self.facet_field)?; - } - for v in &self.facet_prefixes { - os.write_string(9, &v)?; - }; - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SearchReq { - SearchReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &SearchReq| { &m.client_id }, - |m: &mut SearchReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &SearchReq| { &m.seq }, - |m: &mut SearchReq| { &mut m.seq }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "query", - |m: &SearchReq| { &m.query }, - |m: &mut SearchReq| { &mut m.query }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "from", - |m: &SearchReq| { &m.from }, - |m: &mut SearchReq| { &mut m.from }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "limit", - |m: &SearchReq| { &m.limit }, - |m: &mut SearchReq| { &mut m.limit }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "exclude_count", - |m: &SearchReq| { &m.exclude_count }, - |m: &mut SearchReq| { &mut m.exclude_count }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>( - "exclude_docs", - |m: &SearchReq| { &m.exclude_docs }, - |m: &mut SearchReq| { &mut m.exclude_docs }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "facet_field", - |m: &SearchReq| { &m.facet_field }, - |m: &mut SearchReq| { &mut m.facet_field }, - )); - fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "facet_prefixes", - |m: &SearchReq| { &m.facet_prefixes }, - |m: &mut SearchReq| { &mut m.facet_prefixes }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "SearchReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static SearchReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const SearchReq, - }; - unsafe { - instance.get(SearchReq::new) - } - } -} - -impl ::protobuf::Clear for SearchReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.query.clear(); - self.from = 0; - self.limit = 0; - self.exclude_count = false; - self.exclude_docs = false; - self.facet_field.clear(); - self.facet_prefixes.clear(); - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for SearchReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SearchReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct SearchResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SearchResp { - fn default() -> &'a SearchResp { - ::default_instance() - } -} - -impl SearchResp { - pub fn new() -> SearchResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for SearchResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SearchResp { - SearchResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &SearchResp| { &m.value }, - |m: &mut SearchResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &SearchResp| { &m.err }, - |m: &mut SearchResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "SearchResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static SearchResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const SearchResp, - }; - unsafe { - instance.get(SearchResp::new) - } - } -} - -impl ::protobuf::Clear for SearchResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for SearchResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SearchResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct SchemaReq { - // message fields - pub client_id: u64, - pub seq: u64, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SchemaReq { - fn default() -> &'a SchemaReq { - ::default_instance() - } -} - -impl SchemaReq { - pub fn new() -> SchemaReq { - ::std::default::Default::default() - } - - // uint64 client_id = 1; - - - pub fn get_client_id(&self) -> u64 { - self.client_id - } - pub fn clear_client_id(&mut self) { - self.client_id = 0; - } - - // Param is passed by value, moved - pub fn set_client_id(&mut self, v: u64) { - self.client_id = v; - } - - // uint64 seq = 2; - - - pub fn get_seq(&self) -> u64 { - self.seq - } - pub fn clear_seq(&mut self) { - self.seq = 0; - } - - // Param is passed by value, moved - pub fn set_seq(&mut self, v: u64) { - self.seq = v; - } -} - -impl ::protobuf::Message for SchemaReq { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.client_id = tmp; - }, - 2 => { - if wire_type != ::protobuf::wire_format::WireTypeVarint { - return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); - } - let tmp = is.read_uint64()?; - self.seq = tmp; - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if self.client_id != 0 { - my_size += ::protobuf::rt::value_size(1, self.client_id, ::protobuf::wire_format::WireTypeVarint); - } - if self.seq != 0 { - my_size += ::protobuf::rt::value_size(2, self.seq, ::protobuf::wire_format::WireTypeVarint); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if self.client_id != 0 { - os.write_uint64(1, self.client_id)?; - } - if self.seq != 0 { - os.write_uint64(2, self.seq)?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SchemaReq { - SchemaReq::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "client_id", - |m: &SchemaReq| { &m.client_id }, - |m: &mut SchemaReq| { &mut m.client_id }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>( - "seq", - |m: &SchemaReq| { &m.seq }, - |m: &mut SchemaReq| { &mut m.seq }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "SchemaReq", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static SchemaReq { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const SchemaReq, - }; - unsafe { - instance.get(SchemaReq::new) - } - } -} - -impl ::protobuf::Clear for SchemaReq { - fn clear(&mut self) { - self.client_id = 0; - self.seq = 0; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for SchemaReq { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SchemaReq { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(PartialEq,Clone,Default)] -pub struct SchemaResp { - // message fields - pub value: ::std::string::String, - pub err: RespErr, - // special fields - pub unknown_fields: ::protobuf::UnknownFields, - pub cached_size: ::protobuf::CachedSize, -} - -impl<'a> ::std::default::Default for &'a SchemaResp { - fn default() -> &'a SchemaResp { - ::default_instance() - } -} - -impl SchemaResp { - pub fn new() -> SchemaResp { - ::std::default::Default::default() - } - - // string value = 1; - - - pub fn get_value(&self) -> &str { - &self.value - } - pub fn clear_value(&mut self) { - self.value.clear(); - } - - // Param is passed by value, moved - pub fn set_value(&mut self, v: ::std::string::String) { - self.value = v; - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_value(&mut self) -> &mut ::std::string::String { - &mut self.value - } - - // Take field - pub fn take_value(&mut self) -> ::std::string::String { - ::std::mem::replace(&mut self.value, ::std::string::String::new()) - } - - // .indexrpcpb.RespErr err = 2; - - - pub fn get_err(&self) -> RespErr { - self.err - } - pub fn clear_err(&mut self) { - self.err = RespErr::OK; - } - - // Param is passed by value, moved - pub fn set_err(&mut self, v: RespErr) { - self.err = v; - } -} - -impl ::protobuf::Message for SchemaResp { - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { - while !is.eof()? { - let (field_number, wire_type) = is.read_tag_unpack()?; - match field_number { - 1 => { - ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.value)?; - }, - 2 => { - ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.err, 2, &mut self.unknown_fields)? - }, - _ => { - ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u32 { - let mut my_size = 0; - if !self.value.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.value); - } - if self.err != RespErr::OK { - my_size += ::protobuf::rt::enum_size(2, self.err); - } - my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); - self.cached_size.set(my_size); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { - if !self.value.is_empty() { - os.write_string(1, &self.value)?; - } - if self.err != RespErr::OK { - os.write_enum(2, self.err.value())?; - } - os.write_unknown_fields(self.get_unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn get_cached_size(&self) -> u32 { - self.cached_size.get() - } - - fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { - &self.unknown_fields - } - - fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { - &mut self.unknown_fields - } - - fn as_any(&self) -> &dyn (::std::any::Any) { - self as &dyn (::std::any::Any) - } - fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { - self as &mut dyn (::std::any::Any) - } - fn into_any(self: Box) -> ::std::boxed::Box { - self - } - - fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { - Self::descriptor_static() - } - - fn new() -> SchemaResp { - SchemaResp::new() - } - - fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::MessageDescriptor, - }; - unsafe { - descriptor.get(|| { - let mut fields = ::std::vec::Vec::new(); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>( - "value", - |m: &SchemaResp| { &m.value }, - |m: &mut SchemaResp| { &mut m.value }, - )); - fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum>( - "err", - |m: &SchemaResp| { &m.err }, - |m: &mut SchemaResp| { &mut m.err }, - )); - ::protobuf::reflect::MessageDescriptor::new::( - "SchemaResp", - fields, - file_descriptor_proto() - ) - }) - } - } - - fn default_instance() -> &'static SchemaResp { - static mut instance: ::protobuf::lazy::Lazy = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const SchemaResp, - }; - unsafe { - instance.get(SchemaResp::new) - } - } -} - -impl ::protobuf::Clear for SchemaResp { - fn clear(&mut self) { - self.value.clear(); - self.err = RespErr::OK; - self.unknown_fields.clear(); - } -} - -impl ::std::fmt::Debug for SchemaResp { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - ::protobuf::text_format::fmt(self, f) - } -} - -impl ::protobuf::reflect::ProtobufValue for SchemaResp { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Message(self) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum RespErr { - OK = 0, - ErrWrongLeader = 1, - ErrTimeout = 2, - ErrDisconnected = 3, - ErrProbeFailed = 4, - ErrPeerFailed = 5, - ErrMetricsFailed = 6, - ErrGetFailed = 7, - ErrPutFailed = 8, - ErrDeleteFailed = 9, - ErrBulkPutFailed = 10, - ErrBulkDeleteFailed = 11, - ErrCommitFailed = 12, - ErrRollbackFailed = 13, - ErrMergeFailed = 14, - ErrSearchFailed = 15, - ErrSchemaFailed = 16, -} - -impl ::protobuf::ProtobufEnum for RespErr { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(RespErr::OK), - 1 => ::std::option::Option::Some(RespErr::ErrWrongLeader), - 2 => ::std::option::Option::Some(RespErr::ErrTimeout), - 3 => ::std::option::Option::Some(RespErr::ErrDisconnected), - 4 => ::std::option::Option::Some(RespErr::ErrProbeFailed), - 5 => ::std::option::Option::Some(RespErr::ErrPeerFailed), - 6 => ::std::option::Option::Some(RespErr::ErrMetricsFailed), - 7 => ::std::option::Option::Some(RespErr::ErrGetFailed), - 8 => ::std::option::Option::Some(RespErr::ErrPutFailed), - 9 => ::std::option::Option::Some(RespErr::ErrDeleteFailed), - 10 => ::std::option::Option::Some(RespErr::ErrBulkPutFailed), - 11 => ::std::option::Option::Some(RespErr::ErrBulkDeleteFailed), - 12 => ::std::option::Option::Some(RespErr::ErrCommitFailed), - 13 => ::std::option::Option::Some(RespErr::ErrRollbackFailed), - 14 => ::std::option::Option::Some(RespErr::ErrMergeFailed), - 15 => ::std::option::Option::Some(RespErr::ErrSearchFailed), - 16 => ::std::option::Option::Some(RespErr::ErrSchemaFailed), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [RespErr] = &[ - RespErr::OK, - RespErr::ErrWrongLeader, - RespErr::ErrTimeout, - RespErr::ErrDisconnected, - RespErr::ErrProbeFailed, - RespErr::ErrPeerFailed, - RespErr::ErrMetricsFailed, - RespErr::ErrGetFailed, - RespErr::ErrPutFailed, - RespErr::ErrDeleteFailed, - RespErr::ErrBulkPutFailed, - RespErr::ErrBulkDeleteFailed, - RespErr::ErrCommitFailed, - RespErr::ErrRollbackFailed, - RespErr::ErrMergeFailed, - RespErr::ErrSearchFailed, - RespErr::ErrSchemaFailed, - ]; - values - } - - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("RespErr", file_descriptor_proto()) - }) - } - } -} - -impl ::std::marker::Copy for RespErr { -} - -impl ::std::default::Default for RespErr { - fn default() -> Self { - RespErr::OK - } -} - -impl ::protobuf::reflect::ProtobufValue for RespErr { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) - } -} - -#[derive(Clone,PartialEq,Eq,Debug,Hash)] -pub enum ReqType { - Join = 0, - Leave = 1, - Put = 2, - Delete = 3, - BulkPut = 4, - BulkDelete = 5, - Commit = 6, - Rollback = 7, - Merge = 8, -} - -impl ::protobuf::ProtobufEnum for ReqType { - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ReqType::Join), - 1 => ::std::option::Option::Some(ReqType::Leave), - 2 => ::std::option::Option::Some(ReqType::Put), - 3 => ::std::option::Option::Some(ReqType::Delete), - 4 => ::std::option::Option::Some(ReqType::BulkPut), - 5 => ::std::option::Option::Some(ReqType::BulkDelete), - 6 => ::std::option::Option::Some(ReqType::Commit), - 7 => ::std::option::Option::Some(ReqType::Rollback), - 8 => ::std::option::Option::Some(ReqType::Merge), - _ => ::std::option::Option::None - } - } - - fn values() -> &'static [Self] { - static values: &'static [ReqType] = &[ - ReqType::Join, - ReqType::Leave, - ReqType::Put, - ReqType::Delete, - ReqType::BulkPut, - ReqType::BulkDelete, - ReqType::Commit, - ReqType::Rollback, - ReqType::Merge, - ]; - values - } - - fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor { - static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::reflect::EnumDescriptor, - }; - unsafe { - descriptor.get(|| { - ::protobuf::reflect::EnumDescriptor::new("ReqType", file_descriptor_proto()) - }) - } - } -} - -impl ::std::marker::Copy for ReqType { -} - -impl ::std::default::Default for ReqType { - fn default() -> Self { - ReqType::Join - } -} - -impl ::protobuf::reflect::ProtobufValue for ReqType { - fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef { - ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor()) - } -} - -static file_descriptor_proto_data: &'static [u8] = b"\ - \n\x10indexrpcpb.proto\x12\nindexrpcpb\x1a\reraftpb.proto\"\xbf\x04\n\ - \x08ApplyReq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12.\ - \n\x08req_type\x18\x02\x20\x01(\x0e2\x13.indexrpcpb.ReqTypeR\x07reqType\ - \x12.\n\x08join_req\x18\x03\x20\x01(\x0b2\x13.indexrpcpb.JoinReqR\x07joi\ - nReq\x121\n\tleave_req\x18\x04\x20\x01(\x0b2\x14.indexrpcpb.LeaveReqR\ - \x08leaveReq\x12+\n\x07put_req\x18\x05\x20\x01(\x0b2\x12.indexrpcpb.PutR\ - eqR\x06putReq\x124\n\ndelete_req\x18\x06\x20\x01(\x0b2\x15.indexrpcpb.De\ - leteReqR\tdeleteReq\x128\n\x0cbulk_put_req\x18\x07\x20\x01(\x0b2\x16.ind\ - exrpcpb.BulkPutReqR\nbulkPutReq\x12A\n\x0fbulk_delete_req\x18\x08\x20\ - \x01(\x0b2\x19.indexrpcpb.BulkDeleteReqR\rbulkDeleteReq\x124\n\ncommit_r\ - eq\x18\t\x20\x01(\x0b2\x15.indexrpcpb.CommitReqR\tcommitReq\x12:\n\x0cro\ - llback_req\x18\n\x20\x01(\x0b2\x17.indexrpcpb.RollbackReqR\x0brollbackRe\ - q\x121\n\tmerge_req\x18\x0b\x20\x01(\x0b2\x14.indexrpcpb.MergeReqR\x08me\ - rgeReq\"X\n\rConfChangeReq\x12#\n\x02cc\x18\x01\x20\x01(\x0b2\x13.eraftp\ - b.ConfChangeR\x02cc\x12\x0e\n\x02ip\x18\x02\x20\x01(\tR\x02ip\x12\x12\n\ - \x04port\x18\x03\x20\x01(\rR\x04port\"1\n\x08RaftDone\x12%\n\x03err\x18\ - \x01\x20\x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\"\\\n\x07JoinReq\x12\ - \x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x17\n\x07peer_id\ - \x18\x02\x20\x01(\x04R\x06peerId\x12\x1b\n\tpeer_addr\x18\x03\x20\x01(\t\ - R\x08peerAddr\"]\n\x08LeaveReq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04\ - R\x08clientId\x12\x17\n\x07peer_id\x18\x02\x20\x01(\x04R\x06peerId\x12\ - \x1b\n\tpeer_addr\x18\x03\x20\x01(\tR\x08peerAddr\"9\n\x08ProbeReq\x12\ - \x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\ - \x02\x20\x01(\x04R\x03seq\"H\n\tProbeResp\x12\x14\n\x05value\x18\x01\x20\ - \x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13.indexrpcpb.Res\ - pErrR\x03err\"9\n\x08PeersReq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\ - \x08clientId\x12\x10\n\x03seq\x18\x02\x20\x01(\x04R\x03seq\"H\n\tPeersRe\ - sp\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\ - \x20\x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\";\n\nMetricsReq\x12\x1b\n\ - \tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\x02\ - \x20\x01(\x04R\x03seq\"J\n\x0bMetricsResp\x12\x14\n\x05value\x18\x01\x20\ - \x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13.indexrpcpb.Res\ - pErrR\x03err\"N\n\x06GetReq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\ - \x08clientId\x12\x10\n\x03seq\x18\x02\x20\x01(\x04R\x03seq\x12\x15\n\x06\ - doc_id\x18\x03\x20\x01(\tR\x05docId\"F\n\x07GetResp\x12\x14\n\x05value\ - \x18\x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13.in\ - dexrpcpb.RespErrR\x03err\"I\n\x06PutReq\x12\x1b\n\tclient_id\x18\x01\x20\ - \x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\x02\x20\x01(\x04R\x03seq\x12\ - \x10\n\x03doc\x18\x03\x20\x01(\tR\x03doc\"F\n\x07PutResp\x12\x14\n\x05va\ - lue\x18\x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13\ - .indexrpcpb.RespErrR\x03err\"Q\n\tDeleteReq\x12\x1b\n\tclient_id\x18\x01\ - \x20\x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\x02\x20\x01(\x04R\x03seq\ - \x12\x15\n\x06doc_id\x18\x03\x20\x01(\tR\x05docId\"I\n\nDeleteResp\x12\ - \x14\n\x05value\x18\x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\ - \x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\"O\n\nBulkPutReq\x12\x1b\n\tcl\ - ient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\x02\x20\ - \x01(\x04R\x03seq\x12\x12\n\x04docs\x18\x03\x20\x01(\tR\x04docs\"J\n\x0b\ - BulkPutResp\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\x12%\n\x03er\ - r\x18\x02\x20\x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\"R\n\rBulkDeleteR\ - eq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\x03s\ - eq\x18\x02\x20\x01(\x04R\x03seq\x12\x12\n\x04docs\x18\x03\x20\x01(\tR\ - \x04docs\"M\n\x0eBulkDeleteResp\x12\x14\n\x05value\x18\x01\x20\x01(\tR\ - \x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13.indexrpcpb.RespErrR\ - \x03err\":\n\tCommitReq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08cl\ - ientId\x12\x10\n\x03seq\x18\x02\x20\x01(\x04R\x03seq\"I\n\nCommitResp\ - \x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\ - \x20\x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\"<\n\x0bRollbackReq\x12\ - \x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\ - \x02\x20\x01(\x04R\x03seq\"K\n\x0cRollbackResp\x12\x14\n\x05value\x18\ - \x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13.indexr\ - pcpb.RespErrR\x03err\"9\n\x08MergeReq\x12\x1b\n\tclient_id\x18\x01\x20\ - \x01(\x04R\x08clientId\x12\x10\n\x03seq\x18\x02\x20\x01(\x04R\x03seq\"H\ - \n\tMergeResp\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\x12%\n\x03\ - err\x18\x02\x20\x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\"\x8a\x02\n\tSe\ - archReq\x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\ - \x03seq\x18\x02\x20\x01(\x04R\x03seq\x12\x14\n\x05query\x18\x03\x20\x01(\ - \tR\x05query\x12\x12\n\x04from\x18\x04\x20\x01(\x04R\x04from\x12\x14\n\ - \x05limit\x18\x05\x20\x01(\x04R\x05limit\x12#\n\rexclude_count\x18\x06\ - \x20\x01(\x08R\x0cexcludeCount\x12!\n\x0cexclude_docs\x18\x07\x20\x01(\ - \x08R\x0bexcludeDocs\x12\x1f\n\x0bfacet_field\x18\x08\x20\x01(\tR\nfacet\ - Field\x12%\n\x0efacet_prefixes\x18\t\x20\x03(\tR\rfacetPrefixes\"I\n\nSe\ - archResp\x12\x14\n\x05value\x18\x01\x20\x01(\tR\x05value\x12%\n\x03err\ - \x18\x02\x20\x01(\x0e2\x13.indexrpcpb.RespErrR\x03err\":\n\tSchemaReq\ - \x12\x1b\n\tclient_id\x18\x01\x20\x01(\x04R\x08clientId\x12\x10\n\x03seq\ - \x18\x02\x20\x01(\x04R\x03seq\"I\n\nSchemaResp\x12\x14\n\x05value\x18\ - \x01\x20\x01(\tR\x05value\x12%\n\x03err\x18\x02\x20\x01(\x0e2\x13.indexr\ - pcpb.RespErrR\x03err*\xd9\x02\n\x07RespErr\x12\x06\n\x02OK\x10\0\x12\x12\ - \n\x0eErrWrongLeader\x10\x01\x12\x0e\n\nErrTimeout\x10\x02\x12\x13\n\x0f\ - ErrDisconnected\x10\x03\x12\x12\n\x0eErrProbeFailed\x10\x04\x12\x11\n\rE\ - rrPeerFailed\x10\x05\x12\x14\n\x10ErrMetricsFailed\x10\x06\x12\x10\n\x0c\ - ErrGetFailed\x10\x07\x12\x10\n\x0cErrPutFailed\x10\x08\x12\x13\n\x0fErrD\ - eleteFailed\x10\t\x12\x14\n\x10ErrBulkPutFailed\x10\n\x12\x17\n\x13ErrBu\ - lkDeleteFailed\x10\x0b\x12\x13\n\x0fErrCommitFailed\x10\x0c\x12\x15\n\ - \x11ErrRollbackFailed\x10\r\x12\x12\n\x0eErrMergeFailed\x10\x0e\x12\x13\ - \n\x0fErrSearchFailed\x10\x0f\x12\x13\n\x0fErrSchemaFailed\x10\x10*u\n\ - \x07ReqType\x12\x08\n\x04Join\x10\0\x12\t\n\x05Leave\x10\x01\x12\x07\n\ - \x03Put\x10\x02\x12\n\n\x06Delete\x10\x03\x12\x0b\n\x07BulkPut\x10\x04\ - \x12\x0e\n\nBulkDelete\x10\x05\x12\n\n\x06Commit\x10\x06\x12\x0c\n\x08Ro\ - llback\x10\x07\x12\t\n\x05Merge\x10\x08J\xc3?\n\x07\x12\x05\0\0\xd5\x01\ - \x01\n\x08\n\x01\x0c\x12\x03\0\0\x12\n\x08\n\x01\x02\x12\x03\x01\0\x13\n\ - \t\n\x02\x03\0\x12\x03\x03\0\x17\n\n\n\x02\x05\0\x12\x04\x05\0\x17\x01\n\ - \n\n\x03\x05\0\x01\x12\x03\x05\x05\x0c\n\x0b\n\x04\x05\0\x02\0\x12\x03\ - \x06\x04\x0b\n\x0c\n\x05\x05\0\x02\0\x01\x12\x03\x06\x04\x06\n\x0c\n\x05\ - \x05\0\x02\0\x02\x12\x03\x06\t\n\n\x0b\n\x04\x05\0\x02\x01\x12\x03\x07\ - \x04\x17\n\x0c\n\x05\x05\0\x02\x01\x01\x12\x03\x07\x04\x12\n\x0c\n\x05\ - \x05\0\x02\x01\x02\x12\x03\x07\x15\x16\n\x0b\n\x04\x05\0\x02\x02\x12\x03\ - \x08\x04\x13\n\x0c\n\x05\x05\0\x02\x02\x01\x12\x03\x08\x04\x0e\n\x0c\n\ - \x05\x05\0\x02\x02\x02\x12\x03\x08\x11\x12\n\x0b\n\x04\x05\0\x02\x03\x12\ - \x03\t\x04\x18\n\x0c\n\x05\x05\0\x02\x03\x01\x12\x03\t\x04\x13\n\x0c\n\ - \x05\x05\0\x02\x03\x02\x12\x03\t\x16\x17\n\x0b\n\x04\x05\0\x02\x04\x12\ - \x03\n\x04\x17\n\x0c\n\x05\x05\0\x02\x04\x01\x12\x03\n\x04\x12\n\x0c\n\ - \x05\x05\0\x02\x04\x02\x12\x03\n\x15\x16\n\x0b\n\x04\x05\0\x02\x05\x12\ - \x03\x0b\x04\x16\n\x0c\n\x05\x05\0\x02\x05\x01\x12\x03\x0b\x04\x11\n\x0c\ - \n\x05\x05\0\x02\x05\x02\x12\x03\x0b\x14\x15\n\x0b\n\x04\x05\0\x02\x06\ - \x12\x03\x0c\x04\x19\n\x0c\n\x05\x05\0\x02\x06\x01\x12\x03\x0c\x04\x14\n\ - \x0c\n\x05\x05\0\x02\x06\x02\x12\x03\x0c\x17\x18\n\x0b\n\x04\x05\0\x02\ - \x07\x12\x03\r\x04\x15\n\x0c\n\x05\x05\0\x02\x07\x01\x12\x03\r\x04\x10\n\ - \x0c\n\x05\x05\0\x02\x07\x02\x12\x03\r\x13\x14\n\x0b\n\x04\x05\0\x02\x08\ - \x12\x03\x0e\x04\x15\n\x0c\n\x05\x05\0\x02\x08\x01\x12\x03\x0e\x04\x10\n\ - \x0c\n\x05\x05\0\x02\x08\x02\x12\x03\x0e\x13\x14\n\x0b\n\x04\x05\0\x02\t\ - \x12\x03\x0f\x04\x18\n\x0c\n\x05\x05\0\x02\t\x01\x12\x03\x0f\x04\x13\n\ - \x0c\n\x05\x05\0\x02\t\x02\x12\x03\x0f\x16\x17\n\x0b\n\x04\x05\0\x02\n\ - \x12\x03\x10\x04\x1a\n\x0c\n\x05\x05\0\x02\n\x01\x12\x03\x10\x04\x14\n\ - \x0c\n\x05\x05\0\x02\n\x02\x12\x03\x10\x17\x19\n\x0b\n\x04\x05\0\x02\x0b\ - \x12\x03\x11\x04\x1d\n\x0c\n\x05\x05\0\x02\x0b\x01\x12\x03\x11\x04\x17\n\ - \x0c\n\x05\x05\0\x02\x0b\x02\x12\x03\x11\x1a\x1c\n\x0b\n\x04\x05\0\x02\ - \x0c\x12\x03\x12\x04\x19\n\x0c\n\x05\x05\0\x02\x0c\x01\x12\x03\x12\x04\ - \x13\n\x0c\n\x05\x05\0\x02\x0c\x02\x12\x03\x12\x16\x18\n\x0b\n\x04\x05\0\ - \x02\r\x12\x03\x13\x04\x1b\n\x0c\n\x05\x05\0\x02\r\x01\x12\x03\x13\x04\ - \x15\n\x0c\n\x05\x05\0\x02\r\x02\x12\x03\x13\x18\x1a\n\x0b\n\x04\x05\0\ - \x02\x0e\x12\x03\x14\x04\x18\n\x0c\n\x05\x05\0\x02\x0e\x01\x12\x03\x14\ - \x04\x12\n\x0c\n\x05\x05\0\x02\x0e\x02\x12\x03\x14\x15\x17\n\x0b\n\x04\ - \x05\0\x02\x0f\x12\x03\x15\x04\x19\n\x0c\n\x05\x05\0\x02\x0f\x01\x12\x03\ - \x15\x04\x13\n\x0c\n\x05\x05\0\x02\x0f\x02\x12\x03\x15\x16\x18\n\x0b\n\ - \x04\x05\0\x02\x10\x12\x03\x16\x04\x19\n\x0c\n\x05\x05\0\x02\x10\x01\x12\ - \x03\x16\x04\x13\n\x0c\n\x05\x05\0\x02\x10\x02\x12\x03\x16\x16\x18\n\n\n\ - \x02\x05\x01\x12\x04\x19\0#\x01\n\n\n\x03\x05\x01\x01\x12\x03\x19\x05\ - \x0c\n\x0b\n\x04\x05\x01\x02\0\x12\x03\x1a\x04\r\n\x0c\n\x05\x05\x01\x02\ - \0\x01\x12\x03\x1a\x04\x08\n\x0c\n\x05\x05\x01\x02\0\x02\x12\x03\x1a\x0b\ - \x0c\n\x0b\n\x04\x05\x01\x02\x01\x12\x03\x1b\x04\x0e\n\x0c\n\x05\x05\x01\ - \x02\x01\x01\x12\x03\x1b\x04\t\n\x0c\n\x05\x05\x01\x02\x01\x02\x12\x03\ - \x1b\x0c\r\n\x0b\n\x04\x05\x01\x02\x02\x12\x03\x1c\x04\x0c\n\x0c\n\x05\ - \x05\x01\x02\x02\x01\x12\x03\x1c\x04\x07\n\x0c\n\x05\x05\x01\x02\x02\x02\ - \x12\x03\x1c\n\x0b\n\x0b\n\x04\x05\x01\x02\x03\x12\x03\x1d\x04\x0f\n\x0c\ - \n\x05\x05\x01\x02\x03\x01\x12\x03\x1d\x04\n\n\x0c\n\x05\x05\x01\x02\x03\ - \x02\x12\x03\x1d\r\x0e\n\x0b\n\x04\x05\x01\x02\x04\x12\x03\x1e\x04\x10\n\ - \x0c\n\x05\x05\x01\x02\x04\x01\x12\x03\x1e\x04\x0b\n\x0c\n\x05\x05\x01\ - \x02\x04\x02\x12\x03\x1e\x0e\x0f\n\x0b\n\x04\x05\x01\x02\x05\x12\x03\x1f\ - \x04\x13\n\x0c\n\x05\x05\x01\x02\x05\x01\x12\x03\x1f\x04\x0e\n\x0c\n\x05\ - \x05\x01\x02\x05\x02\x12\x03\x1f\x11\x12\n\x0b\n\x04\x05\x01\x02\x06\x12\ - \x03\x20\x04\x0f\n\x0c\n\x05\x05\x01\x02\x06\x01\x12\x03\x20\x04\n\n\x0c\ - \n\x05\x05\x01\x02\x06\x02\x12\x03\x20\r\x0e\n\x0b\n\x04\x05\x01\x02\x07\ - \x12\x03!\x04\x11\n\x0c\n\x05\x05\x01\x02\x07\x01\x12\x03!\x04\x0c\n\x0c\ - \n\x05\x05\x01\x02\x07\x02\x12\x03!\x0f\x10\n\x0b\n\x04\x05\x01\x02\x08\ - \x12\x03\"\x04\x0e\n\x0c\n\x05\x05\x01\x02\x08\x01\x12\x03\"\x04\t\n\x0c\ - \n\x05\x05\x01\x02\x08\x02\x12\x03\"\x0c\r\n\n\n\x02\x04\0\x12\x04%\01\ - \x01\n\n\n\x03\x04\0\x01\x12\x03%\x08\x10\n\x0b\n\x04\x04\0\x02\0\x12\ - \x03&\x04\x19\n\r\n\x05\x04\0\x02\0\x04\x12\x04&\x04%\x12\n\x0c\n\x05\ - \x04\0\x02\0\x05\x12\x03&\x04\n\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03&\x0b\ - \x14\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03&\x17\x18\n\x0b\n\x04\x04\0\x02\ - \x01\x12\x03'\x04\x19\n\r\n\x05\x04\0\x02\x01\x04\x12\x04'\x04&\x19\n\ - \x0c\n\x05\x04\0\x02\x01\x06\x12\x03'\x04\x0b\n\x0c\n\x05\x04\0\x02\x01\ - \x01\x12\x03'\x0c\x14\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03'\x17\x18\n\ - \x0b\n\x04\x04\0\x02\x02\x12\x03(\x04\x19\n\r\n\x05\x04\0\x02\x02\x04\ - \x12\x04(\x04'\x19\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03(\x04\x0b\n\x0c\ - \n\x05\x04\0\x02\x02\x01\x12\x03(\x0c\x14\n\x0c\n\x05\x04\0\x02\x02\x03\ - \x12\x03(\x17\x18\n\x0b\n\x04\x04\0\x02\x03\x12\x03)\x04\x1b\n\r\n\x05\ - \x04\0\x02\x03\x04\x12\x04)\x04(\x19\n\x0c\n\x05\x04\0\x02\x03\x06\x12\ - \x03)\x04\x0c\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03)\r\x16\n\x0c\n\x05\ - \x04\0\x02\x03\x03\x12\x03)\x19\x1a\n\x0b\n\x04\x04\0\x02\x04\x12\x03*\ - \x04\x17\n\r\n\x05\x04\0\x02\x04\x04\x12\x04*\x04)\x1b\n\x0c\n\x05\x04\0\ - \x02\x04\x06\x12\x03*\x04\n\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03*\x0b\ - \x12\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03*\x15\x16\n\x0b\n\x04\x04\0\ - \x02\x05\x12\x03+\x04\x1d\n\r\n\x05\x04\0\x02\x05\x04\x12\x04+\x04*\x17\ - \n\x0c\n\x05\x04\0\x02\x05\x06\x12\x03+\x04\r\n\x0c\n\x05\x04\0\x02\x05\ - \x01\x12\x03+\x0e\x18\n\x0c\n\x05\x04\0\x02\x05\x03\x12\x03+\x1b\x1c\n\ - \x0b\n\x04\x04\0\x02\x06\x12\x03,\x04\x20\n\r\n\x05\x04\0\x02\x06\x04\ - \x12\x04,\x04+\x1d\n\x0c\n\x05\x04\0\x02\x06\x06\x12\x03,\x04\x0e\n\x0c\ - \n\x05\x04\0\x02\x06\x01\x12\x03,\x0f\x1b\n\x0c\n\x05\x04\0\x02\x06\x03\ - \x12\x03,\x1e\x1f\n\x0b\n\x04\x04\0\x02\x07\x12\x03-\x04&\n\r\n\x05\x04\ - \0\x02\x07\x04\x12\x04-\x04,\x20\n\x0c\n\x05\x04\0\x02\x07\x06\x12\x03-\ - \x04\x11\n\x0c\n\x05\x04\0\x02\x07\x01\x12\x03-\x12!\n\x0c\n\x05\x04\0\ - \x02\x07\x03\x12\x03-$%\n\x0b\n\x04\x04\0\x02\x08\x12\x03.\x04\x1d\n\r\n\ - \x05\x04\0\x02\x08\x04\x12\x04.\x04-&\n\x0c\n\x05\x04\0\x02\x08\x06\x12\ - \x03.\x04\r\n\x0c\n\x05\x04\0\x02\x08\x01\x12\x03.\x0e\x18\n\x0c\n\x05\ - \x04\0\x02\x08\x03\x12\x03.\x1b\x1c\n\x0b\n\x04\x04\0\x02\t\x12\x03/\x04\ - \"\n\r\n\x05\x04\0\x02\t\x04\x12\x04/\x04.\x1d\n\x0c\n\x05\x04\0\x02\t\ - \x06\x12\x03/\x04\x0f\n\x0c\n\x05\x04\0\x02\t\x01\x12\x03/\x10\x1c\n\x0c\ - \n\x05\x04\0\x02\t\x03\x12\x03/\x1f!\n\x0b\n\x04\x04\0\x02\n\x12\x030\ - \x04\x1c\n\r\n\x05\x04\0\x02\n\x04\x12\x040\x04/\"\n\x0c\n\x05\x04\0\x02\ - \n\x06\x12\x030\x04\x0c\n\x0c\n\x05\x04\0\x02\n\x01\x12\x030\r\x16\n\x0c\ - \n\x05\x04\0\x02\n\x03\x12\x030\x19\x1b\n\n\n\x02\x04\x01\x12\x043\07\ - \x01\n\n\n\x03\x04\x01\x01\x12\x033\x08\x15\n\x0b\n\x04\x04\x01\x02\0\ - \x12\x034\x04\x1e\n\r\n\x05\x04\x01\x02\0\x04\x12\x044\x043\x17\n\x0c\n\ - \x05\x04\x01\x02\0\x06\x12\x034\x04\x16\n\x0c\n\x05\x04\x01\x02\0\x01\ - \x12\x034\x17\x19\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x034\x1c\x1d\n\x0b\n\ - \x04\x04\x01\x02\x01\x12\x035\x04\x12\n\r\n\x05\x04\x01\x02\x01\x04\x12\ - \x045\x044\x1e\n\x0c\n\x05\x04\x01\x02\x01\x05\x12\x035\x04\n\n\x0c\n\ - \x05\x04\x01\x02\x01\x01\x12\x035\x0b\r\n\x0c\n\x05\x04\x01\x02\x01\x03\ - \x12\x035\x10\x11\n\x0b\n\x04\x04\x01\x02\x02\x12\x036\x04\x14\n\r\n\x05\ - \x04\x01\x02\x02\x04\x12\x046\x045\x12\n\x0c\n\x05\x04\x01\x02\x02\x05\ - \x12\x036\x04\n\n\x0c\n\x05\x04\x01\x02\x02\x01\x12\x036\x0b\x0f\n\x0c\n\ - \x05\x04\x01\x02\x02\x03\x12\x036\x12\x13\n\n\n\x02\x04\x02\x12\x049\0;\ - \x01\n\n\n\x03\x04\x02\x01\x12\x039\x08\x10\n\x0b\n\x04\x04\x02\x02\0\ - \x12\x03:\x04\x14\n\r\n\x05\x04\x02\x02\0\x04\x12\x04:\x049\x12\n\x0c\n\ - \x05\x04\x02\x02\0\x06\x12\x03:\x04\x0b\n\x0c\n\x05\x04\x02\x02\0\x01\ - \x12\x03:\x0c\x0f\n\x0c\n\x05\x04\x02\x02\0\x03\x12\x03:\x12\x13\n\n\n\ - \x02\x04\x03\x12\x04=\0A\x01\n\n\n\x03\x04\x03\x01\x12\x03=\x08\x0f\n\ - \x0b\n\x04\x04\x03\x02\0\x12\x03>\x04\x19\n\r\n\x05\x04\x03\x02\0\x04\ - \x12\x04>\x04=\x11\n\x0c\n\x05\x04\x03\x02\0\x05\x12\x03>\x04\n\n\x0c\n\ - \x05\x04\x03\x02\0\x01\x12\x03>\x0b\x14\n\x0c\n\x05\x04\x03\x02\0\x03\ - \x12\x03>\x17\x18\n\x0b\n\x04\x04\x03\x02\x01\x12\x03?\x04\x17\n\r\n\x05\ - \x04\x03\x02\x01\x04\x12\x04?\x04>\x19\n\x0c\n\x05\x04\x03\x02\x01\x05\ - \x12\x03?\x04\n\n\x0c\n\x05\x04\x03\x02\x01\x01\x12\x03?\x0b\x12\n\x0c\n\ - \x05\x04\x03\x02\x01\x03\x12\x03?\x15\x16\n\x0b\n\x04\x04\x03\x02\x02\ - \x12\x03@\x04\x19\n\r\n\x05\x04\x03\x02\x02\x04\x12\x04@\x04?\x17\n\x0c\ - \n\x05\x04\x03\x02\x02\x05\x12\x03@\x04\n\n\x0c\n\x05\x04\x03\x02\x02\ - \x01\x12\x03@\x0b\x14\n\x0c\n\x05\x04\x03\x02\x02\x03\x12\x03@\x17\x18\n\ - \n\n\x02\x04\x04\x12\x04C\0G\x01\n\n\n\x03\x04\x04\x01\x12\x03C\x08\x10\ - \n\x0b\n\x04\x04\x04\x02\0\x12\x03D\x04\x19\n\r\n\x05\x04\x04\x02\0\x04\ - \x12\x04D\x04C\x12\n\x0c\n\x05\x04\x04\x02\0\x05\x12\x03D\x04\n\n\x0c\n\ - \x05\x04\x04\x02\0\x01\x12\x03D\x0b\x14\n\x0c\n\x05\x04\x04\x02\0\x03\ - \x12\x03D\x17\x18\n\x0b\n\x04\x04\x04\x02\x01\x12\x03E\x04\x17\n\r\n\x05\ - \x04\x04\x02\x01\x04\x12\x04E\x04D\x19\n\x0c\n\x05\x04\x04\x02\x01\x05\ - \x12\x03E\x04\n\n\x0c\n\x05\x04\x04\x02\x01\x01\x12\x03E\x0b\x12\n\x0c\n\ - \x05\x04\x04\x02\x01\x03\x12\x03E\x15\x16\n\x0b\n\x04\x04\x04\x02\x02\ - \x12\x03F\x04\x19\n\r\n\x05\x04\x04\x02\x02\x04\x12\x04F\x04E\x17\n\x0c\ - \n\x05\x04\x04\x02\x02\x05\x12\x03F\x04\n\n\x0c\n\x05\x04\x04\x02\x02\ - \x01\x12\x03F\x0b\x14\n\x0c\n\x05\x04\x04\x02\x02\x03\x12\x03F\x17\x18\n\ - \n\n\x02\x04\x05\x12\x04I\0L\x01\n\n\n\x03\x04\x05\x01\x12\x03I\x08\x10\ - \n\x0b\n\x04\x04\x05\x02\0\x12\x03J\x04\x19\n\r\n\x05\x04\x05\x02\0\x04\ - \x12\x04J\x04I\x12\n\x0c\n\x05\x04\x05\x02\0\x05\x12\x03J\x04\n\n\x0c\n\ - \x05\x04\x05\x02\0\x01\x12\x03J\x0b\x14\n\x0c\n\x05\x04\x05\x02\0\x03\ - \x12\x03J\x17\x18\n\x0b\n\x04\x04\x05\x02\x01\x12\x03K\x04\x13\n\r\n\x05\ - \x04\x05\x02\x01\x04\x12\x04K\x04J\x19\n\x0c\n\x05\x04\x05\x02\x01\x05\ - \x12\x03K\x04\n\n\x0c\n\x05\x04\x05\x02\x01\x01\x12\x03K\x0b\x0e\n\x0c\n\ - \x05\x04\x05\x02\x01\x03\x12\x03K\x11\x12\n\n\n\x02\x04\x06\x12\x04N\0Q\ - \x01\n\n\n\x03\x04\x06\x01\x12\x03N\x08\x11\n\x0b\n\x04\x04\x06\x02\0\ - \x12\x03O\x04\x15\n\r\n\x05\x04\x06\x02\0\x04\x12\x04O\x04N\x13\n\x0c\n\ - \x05\x04\x06\x02\0\x05\x12\x03O\x04\n\n\x0c\n\x05\x04\x06\x02\0\x01\x12\ - \x03O\x0b\x10\n\x0c\n\x05\x04\x06\x02\0\x03\x12\x03O\x13\x14\n\x0b\n\x04\ - \x04\x06\x02\x01\x12\x03P\x04\x14\n\r\n\x05\x04\x06\x02\x01\x04\x12\x04P\ - \x04O\x15\n\x0c\n\x05\x04\x06\x02\x01\x06\x12\x03P\x04\x0b\n\x0c\n\x05\ - \x04\x06\x02\x01\x01\x12\x03P\x0c\x0f\n\x0c\n\x05\x04\x06\x02\x01\x03\ - \x12\x03P\x12\x13\n\n\n\x02\x04\x07\x12\x04S\0V\x01\n\n\n\x03\x04\x07\ - \x01\x12\x03S\x08\x10\n\x0b\n\x04\x04\x07\x02\0\x12\x03T\x04\x19\n\r\n\ - \x05\x04\x07\x02\0\x04\x12\x04T\x04S\x12\n\x0c\n\x05\x04\x07\x02\0\x05\ - \x12\x03T\x04\n\n\x0c\n\x05\x04\x07\x02\0\x01\x12\x03T\x0b\x14\n\x0c\n\ - \x05\x04\x07\x02\0\x03\x12\x03T\x17\x18\n\x0b\n\x04\x04\x07\x02\x01\x12\ - \x03U\x04\x13\n\r\n\x05\x04\x07\x02\x01\x04\x12\x04U\x04T\x19\n\x0c\n\ - \x05\x04\x07\x02\x01\x05\x12\x03U\x04\n\n\x0c\n\x05\x04\x07\x02\x01\x01\ - \x12\x03U\x0b\x0e\n\x0c\n\x05\x04\x07\x02\x01\x03\x12\x03U\x11\x12\n\n\n\ - \x02\x04\x08\x12\x04X\0[\x01\n\n\n\x03\x04\x08\x01\x12\x03X\x08\x11\n\ - \x0b\n\x04\x04\x08\x02\0\x12\x03Y\x04\x15\n\r\n\x05\x04\x08\x02\0\x04\ - \x12\x04Y\x04X\x13\n\x0c\n\x05\x04\x08\x02\0\x05\x12\x03Y\x04\n\n\x0c\n\ - \x05\x04\x08\x02\0\x01\x12\x03Y\x0b\x10\n\x0c\n\x05\x04\x08\x02\0\x03\ - \x12\x03Y\x13\x14\n\x0b\n\x04\x04\x08\x02\x01\x12\x03Z\x04\x14\n\r\n\x05\ - \x04\x08\x02\x01\x04\x12\x04Z\x04Y\x15\n\x0c\n\x05\x04\x08\x02\x01\x06\ - \x12\x03Z\x04\x0b\n\x0c\n\x05\x04\x08\x02\x01\x01\x12\x03Z\x0c\x0f\n\x0c\ - \n\x05\x04\x08\x02\x01\x03\x12\x03Z\x12\x13\n\n\n\x02\x04\t\x12\x04]\0`\ - \x01\n\n\n\x03\x04\t\x01\x12\x03]\x08\x12\n\x0b\n\x04\x04\t\x02\0\x12\ - \x03^\x04\x19\n\r\n\x05\x04\t\x02\0\x04\x12\x04^\x04]\x14\n\x0c\n\x05\ - \x04\t\x02\0\x05\x12\x03^\x04\n\n\x0c\n\x05\x04\t\x02\0\x01\x12\x03^\x0b\ - \x14\n\x0c\n\x05\x04\t\x02\0\x03\x12\x03^\x17\x18\n\x0b\n\x04\x04\t\x02\ - \x01\x12\x03_\x04\x13\n\r\n\x05\x04\t\x02\x01\x04\x12\x04_\x04^\x19\n\ - \x0c\n\x05\x04\t\x02\x01\x05\x12\x03_\x04\n\n\x0c\n\x05\x04\t\x02\x01\ - \x01\x12\x03_\x0b\x0e\n\x0c\n\x05\x04\t\x02\x01\x03\x12\x03_\x11\x12\n\n\ - \n\x02\x04\n\x12\x04b\0e\x01\n\n\n\x03\x04\n\x01\x12\x03b\x08\x13\n\x0b\ - \n\x04\x04\n\x02\0\x12\x03c\x04\x15\n\r\n\x05\x04\n\x02\0\x04\x12\x04c\ - \x04b\x15\n\x0c\n\x05\x04\n\x02\0\x05\x12\x03c\x04\n\n\x0c\n\x05\x04\n\ - \x02\0\x01\x12\x03c\x0b\x10\n\x0c\n\x05\x04\n\x02\0\x03\x12\x03c\x13\x14\ - \n\x0b\n\x04\x04\n\x02\x01\x12\x03d\x04\x14\n\r\n\x05\x04\n\x02\x01\x04\ - \x12\x04d\x04c\x15\n\x0c\n\x05\x04\n\x02\x01\x06\x12\x03d\x04\x0b\n\x0c\ - \n\x05\x04\n\x02\x01\x01\x12\x03d\x0c\x0f\n\x0c\n\x05\x04\n\x02\x01\x03\ - \x12\x03d\x12\x13\n\n\n\x02\x04\x0b\x12\x04g\0k\x01\n\n\n\x03\x04\x0b\ - \x01\x12\x03g\x08\x0e\n\x0b\n\x04\x04\x0b\x02\0\x12\x03h\x04\x19\n\r\n\ - \x05\x04\x0b\x02\0\x04\x12\x04h\x04g\x10\n\x0c\n\x05\x04\x0b\x02\0\x05\ - \x12\x03h\x04\n\n\x0c\n\x05\x04\x0b\x02\0\x01\x12\x03h\x0b\x14\n\x0c\n\ - \x05\x04\x0b\x02\0\x03\x12\x03h\x17\x18\n\x0b\n\x04\x04\x0b\x02\x01\x12\ - \x03i\x04\x13\n\r\n\x05\x04\x0b\x02\x01\x04\x12\x04i\x04h\x19\n\x0c\n\ - \x05\x04\x0b\x02\x01\x05\x12\x03i\x04\n\n\x0c\n\x05\x04\x0b\x02\x01\x01\ - \x12\x03i\x0b\x0e\n\x0c\n\x05\x04\x0b\x02\x01\x03\x12\x03i\x11\x12\n\x0b\ - \n\x04\x04\x0b\x02\x02\x12\x03j\x04\x16\n\r\n\x05\x04\x0b\x02\x02\x04\ - \x12\x04j\x04i\x13\n\x0c\n\x05\x04\x0b\x02\x02\x05\x12\x03j\x04\n\n\x0c\ - \n\x05\x04\x0b\x02\x02\x01\x12\x03j\x0b\x11\n\x0c\n\x05\x04\x0b\x02\x02\ - \x03\x12\x03j\x14\x15\n\n\n\x02\x04\x0c\x12\x04m\0p\x01\n\n\n\x03\x04\ - \x0c\x01\x12\x03m\x08\x0f\n\x0b\n\x04\x04\x0c\x02\0\x12\x03n\x04\x15\n\r\ - \n\x05\x04\x0c\x02\0\x04\x12\x04n\x04m\x11\n\x0c\n\x05\x04\x0c\x02\0\x05\ - \x12\x03n\x04\n\n\x0c\n\x05\x04\x0c\x02\0\x01\x12\x03n\x0b\x10\n\x0c\n\ - \x05\x04\x0c\x02\0\x03\x12\x03n\x13\x14\n\x0b\n\x04\x04\x0c\x02\x01\x12\ - \x03o\x04\x14\n\r\n\x05\x04\x0c\x02\x01\x04\x12\x04o\x04n\x15\n\x0c\n\ - \x05\x04\x0c\x02\x01\x06\x12\x03o\x04\x0b\n\x0c\n\x05\x04\x0c\x02\x01\ - \x01\x12\x03o\x0c\x0f\n\x0c\n\x05\x04\x0c\x02\x01\x03\x12\x03o\x12\x13\n\ - \n\n\x02\x04\r\x12\x04r\0v\x01\n\n\n\x03\x04\r\x01\x12\x03r\x08\x0e\n\ - \x0b\n\x04\x04\r\x02\0\x12\x03s\x04\x19\n\r\n\x05\x04\r\x02\0\x04\x12\ - \x04s\x04r\x10\n\x0c\n\x05\x04\r\x02\0\x05\x12\x03s\x04\n\n\x0c\n\x05\ - \x04\r\x02\0\x01\x12\x03s\x0b\x14\n\x0c\n\x05\x04\r\x02\0\x03\x12\x03s\ - \x17\x18\n\x0b\n\x04\x04\r\x02\x01\x12\x03t\x04\x13\n\r\n\x05\x04\r\x02\ - \x01\x04\x12\x04t\x04s\x19\n\x0c\n\x05\x04\r\x02\x01\x05\x12\x03t\x04\n\ - \n\x0c\n\x05\x04\r\x02\x01\x01\x12\x03t\x0b\x0e\n\x0c\n\x05\x04\r\x02\ - \x01\x03\x12\x03t\x11\x12\n\x0b\n\x04\x04\r\x02\x02\x12\x03u\x04\x13\n\r\ - \n\x05\x04\r\x02\x02\x04\x12\x04u\x04t\x13\n\x0c\n\x05\x04\r\x02\x02\x05\ - \x12\x03u\x04\n\n\x0c\n\x05\x04\r\x02\x02\x01\x12\x03u\x0b\x0e\n\x0c\n\ - \x05\x04\r\x02\x02\x03\x12\x03u\x11\x12\n\n\n\x02\x04\x0e\x12\x04x\0{\ - \x01\n\n\n\x03\x04\x0e\x01\x12\x03x\x08\x0f\n\x0b\n\x04\x04\x0e\x02\0\ - \x12\x03y\x04\x15\n\r\n\x05\x04\x0e\x02\0\x04\x12\x04y\x04x\x11\n\x0c\n\ - \x05\x04\x0e\x02\0\x05\x12\x03y\x04\n\n\x0c\n\x05\x04\x0e\x02\0\x01\x12\ - \x03y\x0b\x10\n\x0c\n\x05\x04\x0e\x02\0\x03\x12\x03y\x13\x14\n\x0b\n\x04\ - \x04\x0e\x02\x01\x12\x03z\x04\x14\n\r\n\x05\x04\x0e\x02\x01\x04\x12\x04z\ - \x04y\x15\n\x0c\n\x05\x04\x0e\x02\x01\x06\x12\x03z\x04\x0b\n\x0c\n\x05\ - \x04\x0e\x02\x01\x01\x12\x03z\x0c\x0f\n\x0c\n\x05\x04\x0e\x02\x01\x03\ - \x12\x03z\x12\x13\n\x0b\n\x02\x04\x0f\x12\x05}\0\x81\x01\x01\n\n\n\x03\ - \x04\x0f\x01\x12\x03}\x08\x11\n\x0b\n\x04\x04\x0f\x02\0\x12\x03~\x04\x19\ - \n\r\n\x05\x04\x0f\x02\0\x04\x12\x04~\x04}\x13\n\x0c\n\x05\x04\x0f\x02\0\ - \x05\x12\x03~\x04\n\n\x0c\n\x05\x04\x0f\x02\0\x01\x12\x03~\x0b\x14\n\x0c\ - \n\x05\x04\x0f\x02\0\x03\x12\x03~\x17\x18\n\x0b\n\x04\x04\x0f\x02\x01\ - \x12\x03\x7f\x04\x13\n\r\n\x05\x04\x0f\x02\x01\x04\x12\x04\x7f\x04~\x19\ - \n\x0c\n\x05\x04\x0f\x02\x01\x05\x12\x03\x7f\x04\n\n\x0c\n\x05\x04\x0f\ - \x02\x01\x01\x12\x03\x7f\x0b\x0e\n\x0c\n\x05\x04\x0f\x02\x01\x03\x12\x03\ - \x7f\x11\x12\n\x0c\n\x04\x04\x0f\x02\x02\x12\x04\x80\x01\x04\x16\n\x0e\n\ - \x05\x04\x0f\x02\x02\x04\x12\x05\x80\x01\x04\x7f\x13\n\r\n\x05\x04\x0f\ - \x02\x02\x05\x12\x04\x80\x01\x04\n\n\r\n\x05\x04\x0f\x02\x02\x01\x12\x04\ - \x80\x01\x0b\x11\n\r\n\x05\x04\x0f\x02\x02\x03\x12\x04\x80\x01\x14\x15\n\ - \x0c\n\x02\x04\x10\x12\x06\x83\x01\0\x86\x01\x01\n\x0b\n\x03\x04\x10\x01\ - \x12\x04\x83\x01\x08\x12\n\x0c\n\x04\x04\x10\x02\0\x12\x04\x84\x01\x04\ - \x15\n\x0f\n\x05\x04\x10\x02\0\x04\x12\x06\x84\x01\x04\x83\x01\x14\n\r\n\ - \x05\x04\x10\x02\0\x05\x12\x04\x84\x01\x04\n\n\r\n\x05\x04\x10\x02\0\x01\ - \x12\x04\x84\x01\x0b\x10\n\r\n\x05\x04\x10\x02\0\x03\x12\x04\x84\x01\x13\ - \x14\n\x0c\n\x04\x04\x10\x02\x01\x12\x04\x85\x01\x04\x14\n\x0f\n\x05\x04\ - \x10\x02\x01\x04\x12\x06\x85\x01\x04\x84\x01\x15\n\r\n\x05\x04\x10\x02\ - \x01\x06\x12\x04\x85\x01\x04\x0b\n\r\n\x05\x04\x10\x02\x01\x01\x12\x04\ - \x85\x01\x0c\x0f\n\r\n\x05\x04\x10\x02\x01\x03\x12\x04\x85\x01\x12\x13\n\ - \x0c\n\x02\x04\x11\x12\x06\x88\x01\0\x8c\x01\x01\n\x0b\n\x03\x04\x11\x01\ - \x12\x04\x88\x01\x08\x12\n\x0c\n\x04\x04\x11\x02\0\x12\x04\x89\x01\x04\ - \x19\n\x0f\n\x05\x04\x11\x02\0\x04\x12\x06\x89\x01\x04\x88\x01\x14\n\r\n\ - \x05\x04\x11\x02\0\x05\x12\x04\x89\x01\x04\n\n\r\n\x05\x04\x11\x02\0\x01\ - \x12\x04\x89\x01\x0b\x14\n\r\n\x05\x04\x11\x02\0\x03\x12\x04\x89\x01\x17\ - \x18\n\x0c\n\x04\x04\x11\x02\x01\x12\x04\x8a\x01\x04\x13\n\x0f\n\x05\x04\ - \x11\x02\x01\x04\x12\x06\x8a\x01\x04\x89\x01\x19\n\r\n\x05\x04\x11\x02\ - \x01\x05\x12\x04\x8a\x01\x04\n\n\r\n\x05\x04\x11\x02\x01\x01\x12\x04\x8a\ - \x01\x0b\x0e\n\r\n\x05\x04\x11\x02\x01\x03\x12\x04\x8a\x01\x11\x12\n\x0c\ - \n\x04\x04\x11\x02\x02\x12\x04\x8b\x01\x04\x14\n\x0f\n\x05\x04\x11\x02\ - \x02\x04\x12\x06\x8b\x01\x04\x8a\x01\x13\n\r\n\x05\x04\x11\x02\x02\x05\ - \x12\x04\x8b\x01\x04\n\n\r\n\x05\x04\x11\x02\x02\x01\x12\x04\x8b\x01\x0b\ - \x0f\n\r\n\x05\x04\x11\x02\x02\x03\x12\x04\x8b\x01\x12\x13\n\x0c\n\x02\ - \x04\x12\x12\x06\x8e\x01\0\x91\x01\x01\n\x0b\n\x03\x04\x12\x01\x12\x04\ - \x8e\x01\x08\x13\n\x0c\n\x04\x04\x12\x02\0\x12\x04\x8f\x01\x04\x15\n\x0f\ - \n\x05\x04\x12\x02\0\x04\x12\x06\x8f\x01\x04\x8e\x01\x15\n\r\n\x05\x04\ - \x12\x02\0\x05\x12\x04\x8f\x01\x04\n\n\r\n\x05\x04\x12\x02\0\x01\x12\x04\ - \x8f\x01\x0b\x10\n\r\n\x05\x04\x12\x02\0\x03\x12\x04\x8f\x01\x13\x14\n\ - \x0c\n\x04\x04\x12\x02\x01\x12\x04\x90\x01\x04\x14\n\x0f\n\x05\x04\x12\ - \x02\x01\x04\x12\x06\x90\x01\x04\x8f\x01\x15\n\r\n\x05\x04\x12\x02\x01\ - \x06\x12\x04\x90\x01\x04\x0b\n\r\n\x05\x04\x12\x02\x01\x01\x12\x04\x90\ - \x01\x0c\x0f\n\r\n\x05\x04\x12\x02\x01\x03\x12\x04\x90\x01\x12\x13\n\x0c\ - \n\x02\x04\x13\x12\x06\x93\x01\0\x97\x01\x01\n\x0b\n\x03\x04\x13\x01\x12\ - \x04\x93\x01\x08\x15\n\x0c\n\x04\x04\x13\x02\0\x12\x04\x94\x01\x04\x19\n\ - \x0f\n\x05\x04\x13\x02\0\x04\x12\x06\x94\x01\x04\x93\x01\x17\n\r\n\x05\ - \x04\x13\x02\0\x05\x12\x04\x94\x01\x04\n\n\r\n\x05\x04\x13\x02\0\x01\x12\ - \x04\x94\x01\x0b\x14\n\r\n\x05\x04\x13\x02\0\x03\x12\x04\x94\x01\x17\x18\ - \n\x0c\n\x04\x04\x13\x02\x01\x12\x04\x95\x01\x04\x13\n\x0f\n\x05\x04\x13\ - \x02\x01\x04\x12\x06\x95\x01\x04\x94\x01\x19\n\r\n\x05\x04\x13\x02\x01\ - \x05\x12\x04\x95\x01\x04\n\n\r\n\x05\x04\x13\x02\x01\x01\x12\x04\x95\x01\ - \x0b\x0e\n\r\n\x05\x04\x13\x02\x01\x03\x12\x04\x95\x01\x11\x12\n\x0c\n\ - \x04\x04\x13\x02\x02\x12\x04\x96\x01\x04\x14\n\x0f\n\x05\x04\x13\x02\x02\ - \x04\x12\x06\x96\x01\x04\x95\x01\x13\n\r\n\x05\x04\x13\x02\x02\x05\x12\ - \x04\x96\x01\x04\n\n\r\n\x05\x04\x13\x02\x02\x01\x12\x04\x96\x01\x0b\x0f\ - \n\r\n\x05\x04\x13\x02\x02\x03\x12\x04\x96\x01\x12\x13\n\x0c\n\x02\x04\ - \x14\x12\x06\x99\x01\0\x9c\x01\x01\n\x0b\n\x03\x04\x14\x01\x12\x04\x99\ - \x01\x08\x16\n\x0c\n\x04\x04\x14\x02\0\x12\x04\x9a\x01\x04\x15\n\x0f\n\ - \x05\x04\x14\x02\0\x04\x12\x06\x9a\x01\x04\x99\x01\x18\n\r\n\x05\x04\x14\ - \x02\0\x05\x12\x04\x9a\x01\x04\n\n\r\n\x05\x04\x14\x02\0\x01\x12\x04\x9a\ - \x01\x0b\x10\n\r\n\x05\x04\x14\x02\0\x03\x12\x04\x9a\x01\x13\x14\n\x0c\n\ - \x04\x04\x14\x02\x01\x12\x04\x9b\x01\x04\x14\n\x0f\n\x05\x04\x14\x02\x01\ - \x04\x12\x06\x9b\x01\x04\x9a\x01\x15\n\r\n\x05\x04\x14\x02\x01\x06\x12\ - \x04\x9b\x01\x04\x0b\n\r\n\x05\x04\x14\x02\x01\x01\x12\x04\x9b\x01\x0c\ - \x0f\n\r\n\x05\x04\x14\x02\x01\x03\x12\x04\x9b\x01\x12\x13\n\x0c\n\x02\ - \x04\x15\x12\x06\x9e\x01\0\xa1\x01\x01\n\x0b\n\x03\x04\x15\x01\x12\x04\ - \x9e\x01\x08\x11\n\x0c\n\x04\x04\x15\x02\0\x12\x04\x9f\x01\x04\x19\n\x0f\ - \n\x05\x04\x15\x02\0\x04\x12\x06\x9f\x01\x04\x9e\x01\x13\n\r\n\x05\x04\ - \x15\x02\0\x05\x12\x04\x9f\x01\x04\n\n\r\n\x05\x04\x15\x02\0\x01\x12\x04\ - \x9f\x01\x0b\x14\n\r\n\x05\x04\x15\x02\0\x03\x12\x04\x9f\x01\x17\x18\n\ - \x0c\n\x04\x04\x15\x02\x01\x12\x04\xa0\x01\x04\x13\n\x0f\n\x05\x04\x15\ - \x02\x01\x04\x12\x06\xa0\x01\x04\x9f\x01\x19\n\r\n\x05\x04\x15\x02\x01\ - \x05\x12\x04\xa0\x01\x04\n\n\r\n\x05\x04\x15\x02\x01\x01\x12\x04\xa0\x01\ - \x0b\x0e\n\r\n\x05\x04\x15\x02\x01\x03\x12\x04\xa0\x01\x11\x12\n\x0c\n\ - \x02\x04\x16\x12\x06\xa3\x01\0\xa6\x01\x01\n\x0b\n\x03\x04\x16\x01\x12\ - \x04\xa3\x01\x08\x12\n\x0c\n\x04\x04\x16\x02\0\x12\x04\xa4\x01\x04\x15\n\ - \x0f\n\x05\x04\x16\x02\0\x04\x12\x06\xa4\x01\x04\xa3\x01\x14\n\r\n\x05\ - \x04\x16\x02\0\x05\x12\x04\xa4\x01\x04\n\n\r\n\x05\x04\x16\x02\0\x01\x12\ - \x04\xa4\x01\x0b\x10\n\r\n\x05\x04\x16\x02\0\x03\x12\x04\xa4\x01\x13\x14\ - \n\x0c\n\x04\x04\x16\x02\x01\x12\x04\xa5\x01\x04\x14\n\x0f\n\x05\x04\x16\ - \x02\x01\x04\x12\x06\xa5\x01\x04\xa4\x01\x15\n\r\n\x05\x04\x16\x02\x01\ - \x06\x12\x04\xa5\x01\x04\x0b\n\r\n\x05\x04\x16\x02\x01\x01\x12\x04\xa5\ - \x01\x0c\x0f\n\r\n\x05\x04\x16\x02\x01\x03\x12\x04\xa5\x01\x12\x13\n\x0c\ - \n\x02\x04\x17\x12\x06\xa8\x01\0\xab\x01\x01\n\x0b\n\x03\x04\x17\x01\x12\ - \x04\xa8\x01\x08\x13\n\x0c\n\x04\x04\x17\x02\0\x12\x04\xa9\x01\x04\x19\n\ - \x0f\n\x05\x04\x17\x02\0\x04\x12\x06\xa9\x01\x04\xa8\x01\x15\n\r\n\x05\ - \x04\x17\x02\0\x05\x12\x04\xa9\x01\x04\n\n\r\n\x05\x04\x17\x02\0\x01\x12\ - \x04\xa9\x01\x0b\x14\n\r\n\x05\x04\x17\x02\0\x03\x12\x04\xa9\x01\x17\x18\ - \n\x0c\n\x04\x04\x17\x02\x01\x12\x04\xaa\x01\x04\x13\n\x0f\n\x05\x04\x17\ - \x02\x01\x04\x12\x06\xaa\x01\x04\xa9\x01\x19\n\r\n\x05\x04\x17\x02\x01\ - \x05\x12\x04\xaa\x01\x04\n\n\r\n\x05\x04\x17\x02\x01\x01\x12\x04\xaa\x01\ - \x0b\x0e\n\r\n\x05\x04\x17\x02\x01\x03\x12\x04\xaa\x01\x11\x12\n\x0c\n\ - \x02\x04\x18\x12\x06\xad\x01\0\xb0\x01\x01\n\x0b\n\x03\x04\x18\x01\x12\ - \x04\xad\x01\x08\x14\n\x0c\n\x04\x04\x18\x02\0\x12\x04\xae\x01\x04\x15\n\ - \x0f\n\x05\x04\x18\x02\0\x04\x12\x06\xae\x01\x04\xad\x01\x16\n\r\n\x05\ - \x04\x18\x02\0\x05\x12\x04\xae\x01\x04\n\n\r\n\x05\x04\x18\x02\0\x01\x12\ - \x04\xae\x01\x0b\x10\n\r\n\x05\x04\x18\x02\0\x03\x12\x04\xae\x01\x13\x14\ - \n\x0c\n\x04\x04\x18\x02\x01\x12\x04\xaf\x01\x04\x14\n\x0f\n\x05\x04\x18\ - \x02\x01\x04\x12\x06\xaf\x01\x04\xae\x01\x15\n\r\n\x05\x04\x18\x02\x01\ - \x06\x12\x04\xaf\x01\x04\x0b\n\r\n\x05\x04\x18\x02\x01\x01\x12\x04\xaf\ - \x01\x0c\x0f\n\r\n\x05\x04\x18\x02\x01\x03\x12\x04\xaf\x01\x12\x13\n\x0c\ - \n\x02\x04\x19\x12\x06\xb2\x01\0\xb5\x01\x01\n\x0b\n\x03\x04\x19\x01\x12\ - \x04\xb2\x01\x08\x10\n\x0c\n\x04\x04\x19\x02\0\x12\x04\xb3\x01\x04\x19\n\ - \x0f\n\x05\x04\x19\x02\0\x04\x12\x06\xb3\x01\x04\xb2\x01\x12\n\r\n\x05\ - \x04\x19\x02\0\x05\x12\x04\xb3\x01\x04\n\n\r\n\x05\x04\x19\x02\0\x01\x12\ - \x04\xb3\x01\x0b\x14\n\r\n\x05\x04\x19\x02\0\x03\x12\x04\xb3\x01\x17\x18\ - \n\x0c\n\x04\x04\x19\x02\x01\x12\x04\xb4\x01\x04\x13\n\x0f\n\x05\x04\x19\ - \x02\x01\x04\x12\x06\xb4\x01\x04\xb3\x01\x19\n\r\n\x05\x04\x19\x02\x01\ - \x05\x12\x04\xb4\x01\x04\n\n\r\n\x05\x04\x19\x02\x01\x01\x12\x04\xb4\x01\ - \x0b\x0e\n\r\n\x05\x04\x19\x02\x01\x03\x12\x04\xb4\x01\x11\x12\n\x0c\n\ - \x02\x04\x1a\x12\x06\xb7\x01\0\xba\x01\x01\n\x0b\n\x03\x04\x1a\x01\x12\ - \x04\xb7\x01\x08\x11\n\x0c\n\x04\x04\x1a\x02\0\x12\x04\xb8\x01\x04\x15\n\ - \x0f\n\x05\x04\x1a\x02\0\x04\x12\x06\xb8\x01\x04\xb7\x01\x13\n\r\n\x05\ - \x04\x1a\x02\0\x05\x12\x04\xb8\x01\x04\n\n\r\n\x05\x04\x1a\x02\0\x01\x12\ - \x04\xb8\x01\x0b\x10\n\r\n\x05\x04\x1a\x02\0\x03\x12\x04\xb8\x01\x13\x14\ - \n\x0c\n\x04\x04\x1a\x02\x01\x12\x04\xb9\x01\x04\x14\n\x0f\n\x05\x04\x1a\ - \x02\x01\x04\x12\x06\xb9\x01\x04\xb8\x01\x15\n\r\n\x05\x04\x1a\x02\x01\ - \x06\x12\x04\xb9\x01\x04\x0b\n\r\n\x05\x04\x1a\x02\x01\x01\x12\x04\xb9\ - \x01\x0c\x0f\n\r\n\x05\x04\x1a\x02\x01\x03\x12\x04\xb9\x01\x12\x13\n\x0c\ - \n\x02\x04\x1b\x12\x06\xbc\x01\0\xc6\x01\x01\n\x0b\n\x03\x04\x1b\x01\x12\ - \x04\xbc\x01\x08\x11\n\x0c\n\x04\x04\x1b\x02\0\x12\x04\xbd\x01\x04\x19\n\ - \x0f\n\x05\x04\x1b\x02\0\x04\x12\x06\xbd\x01\x04\xbc\x01\x13\n\r\n\x05\ - \x04\x1b\x02\0\x05\x12\x04\xbd\x01\x04\n\n\r\n\x05\x04\x1b\x02\0\x01\x12\ - \x04\xbd\x01\x0b\x14\n\r\n\x05\x04\x1b\x02\0\x03\x12\x04\xbd\x01\x17\x18\ - \n\x0c\n\x04\x04\x1b\x02\x01\x12\x04\xbe\x01\x04\x13\n\x0f\n\x05\x04\x1b\ - \x02\x01\x04\x12\x06\xbe\x01\x04\xbd\x01\x19\n\r\n\x05\x04\x1b\x02\x01\ - \x05\x12\x04\xbe\x01\x04\n\n\r\n\x05\x04\x1b\x02\x01\x01\x12\x04\xbe\x01\ - \x0b\x0e\n\r\n\x05\x04\x1b\x02\x01\x03\x12\x04\xbe\x01\x11\x12\n\x0c\n\ - \x04\x04\x1b\x02\x02\x12\x04\xbf\x01\x04\x15\n\x0f\n\x05\x04\x1b\x02\x02\ - \x04\x12\x06\xbf\x01\x04\xbe\x01\x13\n\r\n\x05\x04\x1b\x02\x02\x05\x12\ - \x04\xbf\x01\x04\n\n\r\n\x05\x04\x1b\x02\x02\x01\x12\x04\xbf\x01\x0b\x10\ - \n\r\n\x05\x04\x1b\x02\x02\x03\x12\x04\xbf\x01\x13\x14\n\x0c\n\x04\x04\ - \x1b\x02\x03\x12\x04\xc0\x01\x04\x14\n\x0f\n\x05\x04\x1b\x02\x03\x04\x12\ - \x06\xc0\x01\x04\xbf\x01\x15\n\r\n\x05\x04\x1b\x02\x03\x05\x12\x04\xc0\ - \x01\x04\n\n\r\n\x05\x04\x1b\x02\x03\x01\x12\x04\xc0\x01\x0b\x0f\n\r\n\ - \x05\x04\x1b\x02\x03\x03\x12\x04\xc0\x01\x12\x13\n\x0c\n\x04\x04\x1b\x02\ - \x04\x12\x04\xc1\x01\x04\x15\n\x0f\n\x05\x04\x1b\x02\x04\x04\x12\x06\xc1\ - \x01\x04\xc0\x01\x14\n\r\n\x05\x04\x1b\x02\x04\x05\x12\x04\xc1\x01\x04\n\ - \n\r\n\x05\x04\x1b\x02\x04\x01\x12\x04\xc1\x01\x0b\x10\n\r\n\x05\x04\x1b\ - \x02\x04\x03\x12\x04\xc1\x01\x13\x14\n\x0c\n\x04\x04\x1b\x02\x05\x12\x04\ - \xc2\x01\x04\x1b\n\x0f\n\x05\x04\x1b\x02\x05\x04\x12\x06\xc2\x01\x04\xc1\ - \x01\x15\n\r\n\x05\x04\x1b\x02\x05\x05\x12\x04\xc2\x01\x04\x08\n\r\n\x05\ - \x04\x1b\x02\x05\x01\x12\x04\xc2\x01\t\x16\n\r\n\x05\x04\x1b\x02\x05\x03\ - \x12\x04\xc2\x01\x19\x1a\n\x0c\n\x04\x04\x1b\x02\x06\x12\x04\xc3\x01\x04\ - \x1a\n\x0f\n\x05\x04\x1b\x02\x06\x04\x12\x06\xc3\x01\x04\xc2\x01\x1b\n\r\ - \n\x05\x04\x1b\x02\x06\x05\x12\x04\xc3\x01\x04\x08\n\r\n\x05\x04\x1b\x02\ - \x06\x01\x12\x04\xc3\x01\t\x15\n\r\n\x05\x04\x1b\x02\x06\x03\x12\x04\xc3\ - \x01\x18\x19\n\x0c\n\x04\x04\x1b\x02\x07\x12\x04\xc4\x01\x04\x1b\n\x0f\n\ - \x05\x04\x1b\x02\x07\x04\x12\x06\xc4\x01\x04\xc3\x01\x1a\n\r\n\x05\x04\ - \x1b\x02\x07\x05\x12\x04\xc4\x01\x04\n\n\r\n\x05\x04\x1b\x02\x07\x01\x12\ - \x04\xc4\x01\x0b\x16\n\r\n\x05\x04\x1b\x02\x07\x03\x12\x04\xc4\x01\x19\ - \x1a\n\x0c\n\x04\x04\x1b\x02\x08\x12\x04\xc5\x01\x04'\n\r\n\x05\x04\x1b\ - \x02\x08\x04\x12\x04\xc5\x01\x04\x0c\n\r\n\x05\x04\x1b\x02\x08\x05\x12\ - \x04\xc5\x01\r\x13\n\r\n\x05\x04\x1b\x02\x08\x01\x12\x04\xc5\x01\x14\"\n\ - \r\n\x05\x04\x1b\x02\x08\x03\x12\x04\xc5\x01%&\n\x0c\n\x02\x04\x1c\x12\ - \x06\xc8\x01\0\xcb\x01\x01\n\x0b\n\x03\x04\x1c\x01\x12\x04\xc8\x01\x08\ - \x12\n\x0c\n\x04\x04\x1c\x02\0\x12\x04\xc9\x01\x04\x15\n\x0f\n\x05\x04\ - \x1c\x02\0\x04\x12\x06\xc9\x01\x04\xc8\x01\x14\n\r\n\x05\x04\x1c\x02\0\ - \x05\x12\x04\xc9\x01\x04\n\n\r\n\x05\x04\x1c\x02\0\x01\x12\x04\xc9\x01\ - \x0b\x10\n\r\n\x05\x04\x1c\x02\0\x03\x12\x04\xc9\x01\x13\x14\n\x0c\n\x04\ - \x04\x1c\x02\x01\x12\x04\xca\x01\x04\x14\n\x0f\n\x05\x04\x1c\x02\x01\x04\ - \x12\x06\xca\x01\x04\xc9\x01\x15\n\r\n\x05\x04\x1c\x02\x01\x06\x12\x04\ - \xca\x01\x04\x0b\n\r\n\x05\x04\x1c\x02\x01\x01\x12\x04\xca\x01\x0c\x0f\n\ - \r\n\x05\x04\x1c\x02\x01\x03\x12\x04\xca\x01\x12\x13\n\x0c\n\x02\x04\x1d\ - \x12\x06\xcd\x01\0\xd0\x01\x01\n\x0b\n\x03\x04\x1d\x01\x12\x04\xcd\x01\ - \x08\x11\n\x0c\n\x04\x04\x1d\x02\0\x12\x04\xce\x01\x04\x19\n\x0f\n\x05\ - \x04\x1d\x02\0\x04\x12\x06\xce\x01\x04\xcd\x01\x13\n\r\n\x05\x04\x1d\x02\ - \0\x05\x12\x04\xce\x01\x04\n\n\r\n\x05\x04\x1d\x02\0\x01\x12\x04\xce\x01\ - \x0b\x14\n\r\n\x05\x04\x1d\x02\0\x03\x12\x04\xce\x01\x17\x18\n\x0c\n\x04\ - \x04\x1d\x02\x01\x12\x04\xcf\x01\x04\x13\n\x0f\n\x05\x04\x1d\x02\x01\x04\ - \x12\x06\xcf\x01\x04\xce\x01\x19\n\r\n\x05\x04\x1d\x02\x01\x05\x12\x04\ - \xcf\x01\x04\n\n\r\n\x05\x04\x1d\x02\x01\x01\x12\x04\xcf\x01\x0b\x0e\n\r\ - \n\x05\x04\x1d\x02\x01\x03\x12\x04\xcf\x01\x11\x12\n\x0c\n\x02\x04\x1e\ - \x12\x06\xd2\x01\0\xd5\x01\x01\n\x0b\n\x03\x04\x1e\x01\x12\x04\xd2\x01\ - \x08\x12\n\x0c\n\x04\x04\x1e\x02\0\x12\x04\xd3\x01\x04\x15\n\x0f\n\x05\ - \x04\x1e\x02\0\x04\x12\x06\xd3\x01\x04\xd2\x01\x14\n\r\n\x05\x04\x1e\x02\ - \0\x05\x12\x04\xd3\x01\x04\n\n\r\n\x05\x04\x1e\x02\0\x01\x12\x04\xd3\x01\ - \x0b\x10\n\r\n\x05\x04\x1e\x02\0\x03\x12\x04\xd3\x01\x13\x14\n\x0c\n\x04\ - \x04\x1e\x02\x01\x12\x04\xd4\x01\x04\x14\n\x0f\n\x05\x04\x1e\x02\x01\x04\ - \x12\x06\xd4\x01\x04\xd3\x01\x15\n\r\n\x05\x04\x1e\x02\x01\x06\x12\x04\ - \xd4\x01\x04\x0b\n\r\n\x05\x04\x1e\x02\x01\x01\x12\x04\xd4\x01\x0c\x0f\n\ - \r\n\x05\x04\x1e\x02\x01\x03\x12\x04\xd4\x01\x12\x13b\x06proto3\ -"; - -static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy { - lock: ::protobuf::lazy::ONCE_INIT, - ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto, -}; - -fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto { - ::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap() -} - -pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { - unsafe { - file_descriptor_proto_lazy.get(|| { - parse_descriptor_proto() - }) - } -} diff --git a/src/server/server.rs b/src/server/server.rs index 77831e1..e15cb48 100644 --- a/src/server/server.rs +++ b/src/server/server.rs @@ -7,6 +7,13 @@ use std::time::Duration; use std::{fs, thread}; use async_std::task::block_on; +use bayard_proto::proto::indexpb_grpc::{self, Index as IndexService, IndexClient}; +use bayard_proto::proto::indexrpcpb::{ + ApplyReq, BulkDeleteReq, BulkDeleteResp, BulkPutReq, BulkPutResp, CommitReq, CommitResp, + ConfChangeReq, DeleteReq, DeleteResp, GetReq, GetResp, JoinReq, LeaveReq, MergeReq, MergeResp, + MetricsReq, MetricsResp, PeersReq, PeersResp, ProbeReq, ProbeResp, PutReq, PutResp, RaftDone, + ReqType, RespErr, RollbackReq, RollbackResp, SchemaReq, SchemaResp, SearchReq, SearchResp, +}; use crossbeam_channel::select; use futures::Future; use grpcio::{ChannelBuilder, EnvBuilder, Environment, RpcContext, ServerBuilder, UnarySink}; @@ -21,13 +28,6 @@ use tantivy::schema::{Field, FieldType, IndexRecordOption, Schema}; use tantivy::{Document, Index, IndexWriter, Term}; use crate::client::client::{create_client, Clerk}; -use crate::proto::indexpb_grpc::{self, Index as IndexService, IndexClient}; -use crate::proto::indexrpcpb::{ - ApplyReq, BulkDeleteReq, BulkDeleteResp, BulkPutReq, BulkPutResp, CommitReq, CommitResp, - ConfChangeReq, DeleteReq, DeleteResp, GetReq, GetResp, JoinReq, LeaveReq, MergeReq, MergeResp, - MetricsReq, MetricsResp, PeersReq, PeersResp, ProbeReq, ProbeResp, PutReq, PutResp, RaftDone, - ReqType, RespErr, RollbackReq, RollbackResp, SchemaReq, SchemaResp, SearchReq, SearchResp, -}; use crate::server::metrics::Metrics; use crate::server::peer::PeerMessage; use crate::server::{peer, util};