// NewPeerHandler generates an http.Handler to handle etcd peer requests. func NewPeerHandler(s *etcdserver.EtcdServer) http.Handler { var lh http.Handler if l := s.Lessor(); l != nil { lh = lease.NewHandler(l) } return newPeerHandler(s.Cluster(), s.RaftHandler(), lh) }