Просмотр исходного кода

*: move "etcdserver/api/v3alarm"

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
Gyuho Lee 7 лет назад
Родитель
Сommit
871c218894
2 измененных файлов с 5 добавлено и 5 удалено
  1. 2 2
      etcdserver/api/v3alarm/alarms.go
  2. 3 3
      etcdserver/server.go

+ 2 - 2
alarm/alarms.go → etcdserver/api/v3alarm/alarms.go

@@ -12,8 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Package alarm manages health status alarms in etcd.
-package alarm
+// Package v3alarm manages health status alarms in etcd.
+package v3alarm
 
 import (
 	"sync"

+ 3 - 3
etcdserver/server.go

@@ -29,7 +29,6 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/coreos/etcd/alarm"
 	"github.com/coreos/etcd/auth"
 	"github.com/coreos/etcd/compactor"
 	"github.com/coreos/etcd/etcdserver/api"
@@ -39,6 +38,7 @@ import (
 	"github.com/coreos/etcd/etcdserver/api/v2http/httptypes"
 	stats "github.com/coreos/etcd/etcdserver/api/v2stats"
 	"github.com/coreos/etcd/etcdserver/api/v2store"
+	"github.com/coreos/etcd/etcdserver/api/v3alarm"
 	pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
 	"github.com/coreos/etcd/lease"
 	"github.com/coreos/etcd/lease/leasehttp"
@@ -234,7 +234,7 @@ type EtcdServer struct {
 	bemu       sync.Mutex
 	be         backend.Backend
 	authStore  auth.AuthStore
-	alarmStore *alarm.AlarmStore
+	alarmStore *v3alarm.AlarmStore
 
 	stats  *stats.ServerStats
 	lstats *stats.LeaderStats
@@ -2362,7 +2362,7 @@ func (s *EtcdServer) AuthStore() auth.AuthStore { return s.authStore }
 
 func (s *EtcdServer) restoreAlarms() error {
 	s.applyV3 = s.newApplierV3()
-	as, err := alarm.NewAlarmStore(s)
+	as, err := v3alarm.NewAlarmStore(s)
 	if err != nil {
 		return err
 	}