mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
parent
ef1274edc9
commit
5d346d44bd
11
weed/messaging/client/client.go
Normal file
11
weed/messaging/client/client.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package client
|
||||
|
||||
type MessagingClient struct {
|
||||
bootstrapBrokers []string
|
||||
}
|
||||
|
||||
func NewMessagingClient(bootstrapBrokers []string) *MessagingClient {
|
||||
return &MessagingClient{
|
||||
bootstrapBrokers: bootstrapBrokers,
|
||||
}
|
||||
}
|
14
weed/messaging/client/publisher.go
Normal file
14
weed/messaging/client/publisher.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package client
|
||||
|
||||
import "github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
|
||||
type Publisher struct {
|
||||
}
|
||||
|
||||
func (c *MessagingClient) NewPublisher(namespace, topic string) *Publisher {
|
||||
return &Publisher{}
|
||||
}
|
||||
|
||||
func (p *Publisher) Publish(m *messaging_pb.RawData) error{
|
||||
return nil
|
||||
}
|
14
weed/messaging/client/subscriber.go
Normal file
14
weed/messaging/client/subscriber.go
Normal file
|
@ -0,0 +1,14 @@
|
|||
package client
|
||||
|
||||
import "github.com/chrislusf/seaweedfs/weed/pb/messaging_pb"
|
||||
|
||||
type Subscriber struct {
|
||||
}
|
||||
|
||||
func (c *MessagingClient) NewSubscriber(namespace, topic string) *Subscriber {
|
||||
return &Subscriber{}
|
||||
}
|
||||
|
||||
func (p *Subscriber) Subscribe(processFn func(m *messaging_pb.Message)) error{
|
||||
return nil
|
||||
}
|
Loading…
Reference in a new issue