renaming msgqueue to notification

This commit is contained in:
Chris Lu 2018-09-16 01:18:30 -07:00
parent bea4f6ca14
commit d923ba2206
6 changed files with 13 additions and 13 deletions

View file

@ -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),

View file

@ -1,4 +1,4 @@
package msgqueue
package notification
import (
"github.com/chrislusf/seaweedfs/weed/glog"

View file

@ -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 {

View file

@ -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 {

View file

@ -1,4 +1,4 @@
package msgqueue
package notification
import (
"github.com/chrislusf/seaweedfs/weed/util"

View file

@ -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)