func (p *PeerInfo) GetStoreID() uint64 {
	return p.GetStoreId()
}
GetStoreID provides located storeID
package core
import (
	"github.com/pingcap/kvproto/pkg/metapb"
)
func IsLearner(peer *metapb.Peer) bool {
	return peer.GetRole() == metapb.PeerRole_Learner
}
func IsVoter(peer *metapb.Peer) bool {
	return peer.GetRole() == metapb.PeerRole_Voter
}
func IsVoterOrIncomingVoter(peer *metapb.Peer) bool {
	if peer == nil {
		return false
	}
	switch peer.GetRole() {
	case metapb.PeerRole_IncomingVoter, metapb.PeerRole_Voter:
		return true
	}
	return false
}
func IsLearnerOrDemotingVoter(peer *metapb.Peer) bool {
	if peer == nil {
		return false
	}
	switch peer.GetRole() {
	case metapb.PeerRole_DemotingVoter, metapb.PeerRole_Learner:
		return true
	}
	return false
}
func IsInJointState(peers ...*metapb.Peer) bool {
	for _, peer := range peers {
		switch peer.GetRole() {
		case metapb.PeerRole_IncomingVoter, metapb.PeerRole_DemotingVoter:
			return true
		default:
		}
	}
	return false
}
func CountInJointState(peers ...*metapb.Peer) int {
	count := 0
	for _, peer := range peers {
		switch peer.GetRole() {
		case metapb.PeerRole_IncomingVoter, metapb.PeerRole_DemotingVoter:
			count++
		default:
		}
	}
	return count
}
type PeerInfo struct {
	*metapb.Peer
	loads    []float64
	interval uint64
}
func NewPeerInfo(meta *metapb.Peer, loads []float64, interval uint64) *PeerInfo {
	return &PeerInfo{
		Peer:     meta,
		loads:    loads,
		interval: interval,
	}
}