Browse Source

server: participant.Get -> participant.Store.Get

Yicheng Qin 11 years ago
parent
commit
5ffc0adccc
3 changed files with 6 additions and 6 deletions
  1. 1 1
      etcd/etcd_test.go
  2. 2 2
      etcd/participant.go
  3. 3 3
      etcd/v2_admin.go

+ 1 - 1
etcd/etcd_test.go

@@ -408,7 +408,7 @@ func TestRestoreSnapshotFromLeader(t *testing.T) {
 
 	// check store is recovered
 	for i := 0; i < defaultCompact; i++ {
-		ev, err := e.p.Get(fmt.Sprint("/foo", i), false, false)
+		ev, err := e.p.Store.Get(fmt.Sprint("/foo", i), false, false)
 		if err != nil {
 			t.Errorf("get err = %v", err)
 			continue

+ 2 - 2
etcd/participant.go

@@ -253,7 +253,7 @@ func (p *participant) add(id int64, raftPubAddr string, pubAddr string) error {
 	log.Printf("id=%x participant.add nodeId=%x raftPubAddr=%s pubAddr=%s\n", p.id, id, raftPubAddr, pubAddr)
 	pp := path.Join(v2machineKVPrefix, fmt.Sprint(id))
 
-	_, err := p.Get(pp, false, false)
+	_, err := p.Store.Get(pp, false, false)
 	if err == nil {
 		return nil
 	}
@@ -296,7 +296,7 @@ func (p *participant) remove(id int64) error {
 	log.Printf("id=%x participant.remove nodeId=%x\n", p.id, id)
 	pp := path.Join(v2machineKVPrefix, fmt.Sprint(id))
 
-	v, err := p.Get(pp, false, false)
+	v, err := p.Store.Get(pp, false, false)
 	if err != nil {
 		return nil
 	}

+ 3 - 3
etcd/v2_admin.go

@@ -122,7 +122,7 @@ func (p *participant) clusterConfig() *config.ClusterConfig {
 	c := config.NewClusterConfig()
 	// This is used for backward compatibility because it doesn't
 	// set cluster config in older version.
-	if e, err := p.Get(v2configKVPrefix, false, false); err == nil {
+	if e, err := p.Store.Get(v2configKVPrefix, false, false); err == nil {
 		json.Unmarshal([]byte(*e.Node.Value), c)
 	}
 	return c
@@ -142,7 +142,7 @@ func (p *participant) setClusterConfig(c *config.ClusterConfig) error {
 // someMachineMessage return machine message of specified name.
 func (p *participant) someMachineMessage(name string) (*machineMessage, error) {
 	pp := filepath.Join(v2machineKVPrefix, name)
-	e, err := p.Get(pp, false, false)
+	e, err := p.Store.Get(pp, false, false)
 	if err != nil {
 		return nil, err
 	}
@@ -151,7 +151,7 @@ func (p *participant) someMachineMessage(name string) (*machineMessage, error) {
 }
 
 func (p *participant) allMachineMessages() ([]*machineMessage, error) {
-	e, err := p.Get(v2machineKVPrefix, false, false)
+	e, err := p.Store.Get(v2machineKVPrefix, false, false)
 	if err != nil {
 		return nil, err
 	}