transporter.go 726 B

12345678910111213141516
  1. package raft
  2. //------------------------------------------------------------------------------
  3. //
  4. // Typedefs
  5. //
  6. //------------------------------------------------------------------------------
  7. // Transporter is the interface for allowing the host application to transport
  8. // requests to other nodes.
  9. type Transporter interface {
  10. SendVoteRequest(server Server, peer *Peer, req *RequestVoteRequest) *RequestVoteResponse
  11. SendAppendEntriesRequest(server Server, peer *Peer, req *AppendEntriesRequest) *AppendEntriesResponse
  12. SendSnapshotRequest(server Server, peer *Peer, req *SnapshotRequest) *SnapshotResponse
  13. SendSnapshotRecoveryRequest(server Server, peer *Peer, req *SnapshotRecoveryRequest) *SnapshotRecoveryResponse
  14. }