Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

renaming msgqueue to notification

Chris Lud923ba2206a8
diff --git a/weed/filer2/filer_notify.go b/weed/filer2/filer_notify.go
index a96d8fe4b7..e03a8d6155 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
similarity index 96%
rename from weed/msgqueue/configuration.go
rename to weed/notification/configuration.go
index 769c118356..6ac693ad8c 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
similarity index 93%
rename from weed/msgqueue/kafka/kafka_queue.go
rename to weed/notification/kafka/kafka_queue.go
index f373395f40..8eb41cf854 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
similarity index 78%
rename from weed/msgqueue/log/log_queue.go
rename to weed/notification/log/log_queue.go
index d291d629cb..dcc038dfcd 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
similarity index 94%
rename from weed/msgqueue/message_queue.go
rename to weed/notification/message_queue.go
index 3e26886987..18c4a88303 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 0150caf5e2..2b1e884956 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)