1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-17 17:44:30 +02:00
go-micro/plugins/broker/stomp/subscriber.go
2021-01-20 21:01:10 +00:00

25 lines
399 B
Go

package stomp
import (
"github.com/go-stomp/stomp"
"github.com/asim/go-micro/v3/broker"
)
type subscriber struct {
opts broker.SubscribeOptions
topic string
sub *stomp.Subscription
}
func (s *subscriber) Options() broker.SubscribeOptions {
return s.opts
}
func (s *subscriber) Topic() string {
return s.topic
}
func (s *subscriber) Unsubscribe() error {
return s.sub.Unsubscribe()
}