seaweedfs/weed/notification/log/log_queue.go

30 lines
624 B
Go
Raw Normal View History

2018-08-13 16:20:49 +08:00
package kafka
import (
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/notification"
"github.com/seaweedfs/seaweedfs/weed/util"
2022-08-18 03:05:07 +08:00
"google.golang.org/protobuf/proto"
2018-08-13 16:20:49 +08:00
)
func init() {
2018-09-16 16:18:30 +08:00
notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
2018-08-13 16:20:49 +08:00
}
type LogQueue struct {
}
func (k *LogQueue) GetName() string {
return "log"
}
func (k *LogQueue) Initialize(configuration util.Configuration, prefix string) (err error) {
2018-08-13 16:20:49 +08:00
return nil
}
func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
glog.V(0).Infof("%v: %+v", key, message)
return nil
}