ing
This commit is contained in:
parent
a99bf0599a
commit
6ed6a69d47
|
@ -52,7 +52,7 @@ func (s *Subscribers) Stop() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *Subscribers) Subscribe(channel string) (chan<- *subscribe.Message, error) {
|
||||
func (s *Subscribers) Subscribe(channel string) (<-chan *subscribe.Message, error) {
|
||||
if _, ok := s.subscriptions[channel]; ok {
|
||||
return nil, subscribe.ChannelExistError{Channel: channel}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,6 @@ type Subscriber interface {
|
|||
Start() error
|
||||
Stop() error
|
||||
|
||||
Subscribe(channel string) (chan<- *Message, error)
|
||||
Subscribe(channel string) (<-chan *Message, error)
|
||||
Unsubscribe(channel string) error
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user