Example #1
0
// fill populates pb.ResponseHeader using etcdserver information
func (h *header) fill(rh *pb.ResponseHeader) {
	rh.ClusterId = uint64(h.clusterID)
	rh.MemberId = uint64(h.memberID)
	rh.RaftTerm = h.raftTimer.Term()
	if rh.Revision == 0 {
		rh.Revision = h.rev()
	}
}
Example #2
0
File: key.go Project: jkhelil/etcd
// fillInHeader populates pb.ResponseHeader from kvServer, except Revision.
func (s *kvServer) fillInHeader(h *pb.ResponseHeader) {
	h.ClusterId = uint64(s.clusterID)
	h.MemberId = uint64(s.memberID)
	h.RaftTerm = s.raftTimer.Term()
}