فهرست منبع

server: move var noneId to standby.go

Yicheng Qin 11 سال پیش
والد
کامیت
6dc49def25
2فایلهای تغییر یافته به همراه7 افزوده شده و 4 حذف شده
  1. 3 4
      etcd/participant.go
  2. 4 0
      etcd/standby.go

+ 3 - 4
etcd/participant.go

@@ -36,10 +36,9 @@ const (
 )
 )
 
 
 var (
 var (
-	tmpErr            = fmt.Errorf("try again")
-	stopErr           = fmt.Errorf("server is stopped")
-	raftStopErr       = fmt.Errorf("raft is stopped")
-	noneId      int64 = -1
+	tmpErr      = fmt.Errorf("try again")
+	stopErr     = fmt.Errorf("server is stopped")
+	raftStopErr = fmt.Errorf("raft is stopped")
 )
 )
 
 
 type participant struct {
 type participant struct {

+ 4 - 0
etcd/standby.go

@@ -11,6 +11,10 @@ import (
 	"github.com/coreos/etcd/store"
 	"github.com/coreos/etcd/store"
 )
 )
 
 
+var (
+	noneId int64 = -1
+)
+
 type standby struct {
 type standby struct {
 	id          int64
 	id          int64
 	pubAddr     string
 	pubAddr     string