aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-09-16 01:18:30 -0700
committerChris Lu <chris.lu@gmail.com>2018-09-16 01:18:30 -0700
commitd923ba2206a8238977e740f98f061242d61ed5e6 (patch)
treea2fcaf40d5f2398b2b8ad3c2a77a22579597cc1c
parentbea4f6ca14615de23ba81a84cf61ba0f2a28b7f6 (diff)
downloadseaweedfs-d923ba2206a8238977e740f98f061242d61ed5e6.tar.xz
seaweedfs-d923ba2206a8238977e740f98f061242d61ed5e6.zip
renaming msgqueue to notification
-rw-r--r--weed/filer2/filer_notify.go6
-rw-r--r--weed/notification/configuration.go (renamed from weed/msgqueue/configuration.go)2
-rw-r--r--weed/notification/kafka/kafka_queue.go (renamed from weed/msgqueue/kafka/kafka_queue.go)4
-rw-r--r--weed/notification/log/log_queue.go (renamed from weed/msgqueue/log/log_queue.go)4
-rw-r--r--weed/notification/message_queue.go (renamed from weed/msgqueue/message_queue.go)2
-rw-r--r--weed/server/filer_server.go8
6 files changed, 13 insertions, 13 deletions
diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go
index a96d8fe4b..e03a8d615 100644
--- a/weed/filer2/filer_notify.go
+++ b/weed/filer2/filer_notify.go
@@ -1,7 +1,7 @@
package filer2
import (
- "github.com/chrislusf/seaweedfs/weed/msgqueue"
+ "github.com/chrislusf/seaweedfs/weed/notification"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
)
@@ -15,9 +15,9 @@ func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry) {
return
}
- if msgqueue.Queue != nil {
+ if notification.Queue != nil {
- msgqueue.Queue.SendMessage(
+ notification.Queue.SendMessage(
key,
&filer_pb.EventNotification{
OldEntry: toProtoEntry(oldEntry),
diff --git a/weed/msgqueue/configuration.go b/weed/notification/configuration.go
index 769c11835..6ac693ad8 100644
--- a/weed/msgqueue/configuration.go
+++ b/weed/notification/configuration.go
@@ -1,4 +1,4 @@
-package msgqueue
+package notification
import (
"github.com/chrislusf/seaweedfs/weed/glog"
diff --git a/weed/msgqueue/kafka/kafka_queue.go b/weed/notification/kafka/kafka_queue.go
index f373395f4..8eb41cf85 100644
--- a/weed/msgqueue/kafka/kafka_queue.go
+++ b/weed/notification/kafka/kafka_queue.go
@@ -3,13 +3,13 @@ package kafka
import (
"github.com/Shopify/sarama"
"github.com/chrislusf/seaweedfs/weed/glog"
- "github.com/chrislusf/seaweedfs/weed/msgqueue"
+ "github.com/chrislusf/seaweedfs/weed/notification"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/golang/protobuf/proto"
)
func init() {
- msgqueue.MessageQueues = append(msgqueue.MessageQueues, &KafkaQueue{})
+ notification.MessageQueues = append(notification.MessageQueues, &KafkaQueue{})
}
type KafkaQueue struct {
diff --git a/weed/msgqueue/log/log_queue.go b/weed/notification/log/log_queue.go
index d291d629c..dcc038dfc 100644
--- a/weed/msgqueue/log/log_queue.go
+++ b/weed/notification/log/log_queue.go
@@ -2,13 +2,13 @@ package kafka
import (
"github.com/chrislusf/seaweedfs/weed/glog"
- "github.com/chrislusf/seaweedfs/weed/msgqueue"
+ "github.com/chrislusf/seaweedfs/weed/notification"
"github.com/chrislusf/seaweedfs/weed/util"
"github.com/golang/protobuf/proto"
)
func init() {
- msgqueue.MessageQueues = append(msgqueue.MessageQueues, &LogQueue{})
+ notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
}
type LogQueue struct {
diff --git a/weed/msgqueue/message_queue.go b/weed/notification/message_queue.go
index 3e2688698..18c4a8830 100644
--- a/weed/msgqueue/message_queue.go
+++ b/weed/notification/message_queue.go
@@ -1,4 +1,4 @@
-package msgqueue
+package notification
import (
"github.com/chrislusf/seaweedfs/weed/util"
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go
index 0150caf5e..2b1e88495 100644
--- a/weed/server/filer_server.go
+++ b/weed/server/filer_server.go
@@ -11,9 +11,9 @@ import (
_ "github.com/chrislusf/seaweedfs/weed/filer2/postgres"
_ "github.com/chrislusf/seaweedfs/weed/filer2/redis"
"github.com/chrislusf/seaweedfs/weed/glog"
- "github.com/chrislusf/seaweedfs/weed/msgqueue"
- _ "github.com/chrislusf/seaweedfs/weed/msgqueue/kafka"
- _ "github.com/chrislusf/seaweedfs/weed/msgqueue/log"
+ "github.com/chrislusf/seaweedfs/weed/notification"
+ _ "github.com/chrislusf/seaweedfs/weed/notification/kafka"
+ _ "github.com/chrislusf/seaweedfs/weed/notification/log"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/spf13/viper"
)
@@ -54,7 +54,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
fs.filer.LoadConfiguration(v)
- msgqueue.LoadConfiguration(v.Sub("notification"))
+ notification.LoadConfiguration(v.Sub("notification"))
defaultMux.HandleFunc("/favicon.ico", faviconHandler)
defaultMux.HandleFunc("/", fs.filerHandler)