func (c *pubSubConn) Events() <-chan *message.EvntPayload {
	c.once.Do(func() {
		c.evch = make(chan *message.EvntPayload)
		go c.listen()
	})
	return c.evch
}
Events returns the stream of events from channels that the redis
connection is subscribed to.
package redisbroker
import (
	"encoding/json"
	"expvar"
	"sync"
	"github.com/mna/juggler/broker"
	"github.com/mna/juggler/message"
	"github.com/garyburd/redigo/redis"
)
var _ broker.PubSubConn = (*pubSubConn)(nil)
type pubSubConn struct {
	psc   redis.PubSubConn
	logFn func(string, ...interface{})
	vars  *expvar.Map
	wmu sync.Mutex
	once sync.Once
	evch chan *message.EvntPayload
	errmu sync.Mutex
	err   error
}
func (c *pubSubConn) Close() error {
	return c.psc.Close()
}
func (c *pubSubConn) Subscribe(channel string, pattern bool) error {
	return c.subUnsub(channel, pattern, true)
}
func (c *pubSubConn) Unsubscribe(channel string, pattern bool) error {
	return c.subUnsub(channel, pattern, false)
}
func (c *pubSubConn) subUnsub(ch string, pat bool, sub bool) error {
	var fn func(...interface{}) error
	switch {
	case pat && sub:
		fn = c.psc.PSubscribe
	case pat && !sub:
		fn = c.psc.PUnsubscribe
	case !pat && sub:
		fn = c.psc.Subscribe
	case !pat && !sub:
		fn = c.psc.Unsubscribe
	}
	c.wmu.Lock()
	err := fn(ch)
	c.wmu.Unlock()
	return err
}