blob: b3591bea2d9f7d3c7481e8b3f313633579418502 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
syntax="proto2";
package org.apache.hugegraph.backend.store.raft.rpc;
option java_package="org.apache.hugegraph.backend.store.raft.rpc";
option java_outer_classname = "RaftRequests";
enum StoreType {
SCHEMA = 0;
GRAPH = 1;
SYSTEM = 2;
ALL = 3;
}
enum StoreAction {
NONE = 0;
INIT = 1;
CLEAR = 2;
TRUNCATE = 3;
SNAPSHOT = 4;
BEGIN_TX = 10;
COMMIT_TX = 11;
ROLLBACK_TX = 12;
MUTATE = 20;
INCR_COUNTER = 21;
QUERY = 30;
};
message StoreCommandRequest {
required StoreType type = 1;
required StoreAction action = 2;
required bytes data = 3;
}
message StoreCommandResponse {
required bool status = 1;
optional string message = 2;
}
message CommonResponse {
required bool status = 1;
optional string message = 2;
}
message ListPeersRequest {
}
message ListPeersResponse {
required CommonResponse common = 1;
repeated string endpoints = 2;
}
message SetLeaderRequest {
required string endpoint = 1;
}
message SetLeaderResponse {
required CommonResponse common = 1;
}
message AddPeerRequest {
required string endpoint = 1;
}
message AddPeerResponse {
required CommonResponse common = 1;
}
message RemovePeerRequest {
required string endpoint = 1;
}
message RemovePeerResponse {
required CommonResponse common = 1;
}