syntax = "proto3"; package raftservice; import "eraftpb.proto"; service RaftService { rpc RequestId(RequestIdArgs) returns (IdRequestReponse) {} rpc ChangeConfig(eraftpb.ConfChange) returns (RaftResponse) {} rpc SendMessage(eraftpb.Message) returns (RaftResponse) {} } enum ResultCode { Ok = 0; Error = 1; WrongLeader = 2; } message Proposal { bytes inner = 1; } message IdRequestReponse{ ResultCode code = 1; bytes data = 2; } message RequestIdArgs { string addr = 1; } message Entry { uint64 key = 1; string value = 2; } message RaftResponse { bytes inner = 2; }