Browse Source

renaming msgqueue to notification

pull/747/head
Chris Lu 6 years ago
parent
commit
d923ba2206
  1. 6
      weed/filer2/filer_notify.go
  2. 2
      weed/notification/configuration.go
  3. 4
      weed/notification/kafka/kafka_queue.go
  4. 4
      weed/notification/log/log_queue.go
  5. 2
      weed/notification/message_queue.go
  6. 8
      weed/server/filer_server.go

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

2
weed/msgqueue/configuration.go → weed/notification/configuration.go

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

4
weed/msgqueue/kafka/kafka_queue.go → 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 {

4
weed/msgqueue/log/log_queue.go → 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 {

2
weed/msgqueue/message_queue.go → weed/notification/message_queue.go

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

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

Loading…
Cancel
Save