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