etcd/raft/raftpb/raft.proto
2014-09-15 14:34:23 -07:00

44 lines
1.5 KiB
Protocol Buffer

package raftpb;
import "code.google.com/p/gogoprotobuf/gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
message Info {
required int64 id = 1 [(gogoproto.nullable) = false];
}
message Entry {
required int64 term = 2 [(gogoproto.nullable) = false];
required int64 index = 3 [(gogoproto.nullable) = false];
optional bytes data = 4 [(gogoproto.nullable) = false];
}
message Snapshot {
required bytes data = 1 [(gogoproto.nullable) = false];
repeated int64 nodes = 2 [(gogoproto.nullable) = false];
required int64 index = 3 [(gogoproto.nullable) = false];
required int64 term = 4 [(gogoproto.nullable) = false];
}
message Message {
required int64 type = 1 [(gogoproto.nullable) = false];
required int64 to = 2 [(gogoproto.nullable) = false];
required int64 from = 3 [(gogoproto.nullable) = false];
required int64 term = 4 [(gogoproto.nullable) = false];
required int64 logTerm = 5 [(gogoproto.nullable) = false];
required int64 index = 6 [(gogoproto.nullable) = false];
repeated Entry entries = 7 [(gogoproto.nullable) = false];
required int64 commit = 8 [(gogoproto.nullable) = false];
required Snapshot snapshot = 9 [(gogoproto.nullable) = false];
}
message State {
required int64 term = 1 [(gogoproto.nullable) = false];
required int64 vote = 2 [(gogoproto.nullable) = false];
required int64 commit = 3 [(gogoproto.nullable) = false];
}