syntax = "proto3"; package railyard; service Railyard { rpc AppendEntries(AppendEntriesRequest) returns (AppendEntriesResponse); rpc RequestVote(RequestVoteRequest) returns (RequestVoteResponse); rpc InstallSnapshot(InstallSnapshotRequest) returns (InstallSnapshotResponse); rpc CreateStream (CreateStreamRequest) returns (CreateStreamResponse); rpc GetRecords (GetRecordsRequest) returns (GetRecordsResponse); rpc PutRecord (PutRecordRequest) returns (PutRecordResponse); rpc GetIteratorIndex (GetIteratorIndexRequest) returns (GetIteratorIndexResponse); } message Entry { uint64 term = 1; uint64 index = 2; bytes command = 3; } message AppendEntriesRequest { uint64 term = 1; string leaderId = 2; uint64 prevLogIndex = 3; uint64 prevLogTerm = 4; repeated Entry entries = 5; uint64 leaderCommit = 6; } message AppendEntriesResponse { uint64 term = 1; bool success = 2; } message RequestVoteRequest { uint64 term = 1; string candidateId = 2; uint64 lastLogIndex = 3; uint64 lastLogTerm = 4; } message RequestVoteResponse { uint64 term = 1; bool voteGranted = 2; } message InstallSnapshotRequest { } message InstallSnapshotResponse { } message CreateStreamRequest { string streamName = 1; int32 shardCount = 2; } message CreateStreamResponse { } message GetRecordsRequest { string streamName = 1; int64 count = 2; int64 sequenceNumber = 3; } message GetRecordsResponse { bool status = 1; } message PutRecordRequest { } message PutRecordResponse { } message GetIteratorIndexRequest { } message GetIteratorIndexResponse { }