goraft / raft

UNMAINTAINED: A Go implementation of the Raft distributed consensus protocol.
MIT License
2.43k stars 480 forks source link

Add Peer.LastActivity() #194

Closed benbjohnson closed 10 years ago

benbjohnson commented 10 years ago

This pull request adds Peer.LastActivity() to return the last time that a response was received from the peer. This is needed for auto-demotion of peers on https://github.com/coreos/etcd/pull/582.

/cc @xiangli-cmu @philips

philips commented 10 years ago

Just hit this in the proxy pr, reading now.

philips commented 10 years ago

lgtm! this seems like a valuable feature.