mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
30 lines
624 B
Go
30 lines
624 B
Go
package kafka
|
|
|
|
import (
|
|
"github.com/golang/protobuf/proto"
|
|
"github.com/seaweedfs/seaweedfs/weed/glog"
|
|
"github.com/seaweedfs/seaweedfs/weed/notification"
|
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
|
)
|
|
|
|
func init() {
|
|
notification.MessageQueues = append(notification.MessageQueues, &LogQueue{})
|
|
}
|
|
|
|
type LogQueue struct {
|
|
}
|
|
|
|
func (k *LogQueue) GetName() string {
|
|
return "log"
|
|
}
|
|
|
|
func (k *LogQueue) Initialize(configuration util.Configuration, prefix string) (err error) {
|
|
return nil
|
|
}
|
|
|
|
func (k *LogQueue) SendMessage(key string, message proto.Message) (err error) {
|
|
|
|
glog.V(0).Infof("%v: %+v", key, message)
|
|
return nil
|
|
}
|