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 package filer2
import ( import (
"github.com/chrislusf/seaweedfs/weed/msgqueue" "github.com/chrislusf/seaweedfs/weed/notification"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
) )
@ -15,9 +15,9 @@ func (f *Filer) NotifyUpdateEvent(oldEntry, newEntry *Entry) {
return return
} }
if msgqueue.Queue != nil { if notification.Queue != nil {
msgqueue.Queue.SendMessage( notification.Queue.SendMessage(
key, key,
&filer_pb.EventNotification{ &filer_pb.EventNotification{
OldEntry: toProtoEntry(oldEntry), OldEntry: toProtoEntry(oldEntry),

View file

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

View file

@ -3,13 +3,13 @@ package kafka
import ( import (
"github.com/Shopify/sarama" "github.com/Shopify/sarama"
"github.com/chrislusf/seaweedfs/weed/glog" "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/chrislusf/seaweedfs/weed/util"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
) )
func init() { func init() {
msgqueue.MessageQueues = append(msgqueue.MessageQueues, &KafkaQueue{}) notification.MessageQueues = append(notification.MessageQueues, &KafkaQueue{})
} }
type KafkaQueue struct { type KafkaQueue struct {

View file

@ -2,13 +2,13 @@ package kafka
import ( import (
"github.com/chrislusf/seaweedfs/weed/glog" "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/chrislusf/seaweedfs/weed/util"
"github.com/golang/protobuf/proto" "github.com/golang/protobuf/proto"
) )
func init() { func init() {
msgqueue.MessageQueues = append(msgqueue.MessageQueues, &LogQueue{}) notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
} }
type LogQueue struct { type LogQueue struct {

View file

@ -1,4 +1,4 @@
package msgqueue package notification
import ( import (
"github.com/chrislusf/seaweedfs/weed/util" "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/postgres"
_ "github.com/chrislusf/seaweedfs/weed/filer2/redis" _ "github.com/chrislusf/seaweedfs/weed/filer2/redis"
"github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/msgqueue" "github.com/chrislusf/seaweedfs/weed/notification"
_ "github.com/chrislusf/seaweedfs/weed/msgqueue/kafka" _ "github.com/chrislusf/seaweedfs/weed/notification/kafka"
_ "github.com/chrislusf/seaweedfs/weed/msgqueue/log" _ "github.com/chrislusf/seaweedfs/weed/notification/log"
"github.com/chrislusf/seaweedfs/weed/security" "github.com/chrislusf/seaweedfs/weed/security"
"github.com/spf13/viper" "github.com/spf13/viper"
) )
@ -54,7 +54,7 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
fs.filer.LoadConfiguration(v) fs.filer.LoadConfiguration(v)
msgqueue.LoadConfiguration(v.Sub("notification")) notification.LoadConfiguration(v.Sub("notification"))
defaultMux.HandleFunc("/favicon.ico", faviconHandler) defaultMux.HandleFunc("/favicon.ico", faviconHandler)
defaultMux.HandleFunc("/", fs.filerHandler) defaultMux.HandleFunc("/", fs.filerHandler)