func (m *Member) GetLeaderID() uint64 {
	return m.GetLeader().GetMemberId()
}
GetLeaderID returns current PD leader's member ID.
package member
import (
	"context"
	"fmt"
	"math/rand"
	"os"
	"path"
	"path/filepath"
	"strconv"
	"strings"
	"sync/atomic"
	"time"
	"github.com/pingcap/errors"
	"github.com/pingcap/kvproto/pkg/pdpb"
	"github.com/pingcap/log"
	"github.com/tikv/pd/pkg/errs"
	"github.com/tikv/pd/pkg/etcdutil"
	"github.com/tikv/pd/server/config"
	"github.com/tikv/pd/server/election"
	"github.com/tikv/pd/server/kv"
	"go.etcd.io/etcd/clientv3"
	"go.etcd.io/etcd/embed"
	"go.uber.org/zap"
)
const (
	moveLeaderTimeout          = 5 * time.Second
	dcLocationConfigEtcdPrefix = "dc-location"
)
type Member struct {
	leadership *election.Leadership
	leader     atomic.Value  
	etcd     *embed.Etcd
	client   *clientv3.Client
	id       uint64        
	member   *pdpb.Member  
	rootPath string
	memberValue string
}
func NewMember(etcd *embed.Etcd, client *clientv3.Client, id uint64) *Member {
	return &Member{
		etcd:   etcd,
		client: client,
		id:     id,
	}
}
func (m *Member) ID() uint64 {
	return m.id
}
func (m *Member) MemberValue() string {
	return m.memberValue
}
func (m *Member) Member() *pdpb.Member {
	return m.member
}
func (m *Member) Etcd() *embed.Etcd {
	return m.etcd
}
func (m *Member) Client() *clientv3.Client {
	return m.client
}
func (m *Member) IsLeader() bool {
	return m.leadership.Check() && m.GetLeader().GetMemberId() == m.member.GetMemberId()
}