From 6ed6a69d479e3c6fffa79ccbe8628dea26ef5328 Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 9 Apr 2018 22:14:26 +0900 Subject: [PATCH] ing --- subscribe/redis/redis.go | 2 +- subscribe/subscriber.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subscribe/redis/redis.go b/subscribe/redis/redis.go index 5ce6e6a..e29a626 100644 --- a/subscribe/redis/redis.go +++ b/subscribe/redis/redis.go @@ -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} } diff --git a/subscribe/subscriber.go b/subscribe/subscriber.go index f7456dc..2c70b04 100644 --- a/subscribe/subscriber.go +++ b/subscribe/subscriber.go @@ -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 }