mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
renaming msgqueue to notification
This commit is contained in:
parent
bea4f6ca14
commit
d923ba2206
|
@ -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),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package msgqueue
|
||||
package notification
|
||||
|
||||
import (
|
||||
"github.com/chrislusf/seaweedfs/weed/glog"
|
|
@ -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 {
|
|
@ -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 {
|
|
@ -1,4 +1,4 @@
|
|||
package msgqueue
|
||||
package notification
|
||||
|
||||
import (
|
||||
"github.com/chrislusf/seaweedfs/weed/util"
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue