//NewRedisWithContext create a redis redisDispatcher that relates to ctx, if ctx is cancelled, redisDispatcher will stop
NewRedisWithContext create a redis redisDispatcher that relates to ctx, if ctx is cancelled, redisDispatcher will stop
// NewRedisWithContext create a redis redisDispatcher that relates to ctx if ctx is cancelled redisDispatcher will stop
func NewRedisWithContext(ctx context.Context, client RedisClient, opts ...Option) Dispatcher {
	if nil == client {
		panic("no client specified")
	}
	options := parse(defaultRedisOptions(), opts...)
	inst := &redisDispatcher{
		handlers:      map[Topic][]HandleFunc{},
		clientWrapper: &clientWrapper{client: client},
		options:       options,
	}
	inst.start(ctx)
	return inst
}
func NewRedisWithContext ( ctx context . Context , client RedisClient , opts ... Option ) Dispatcher { if nil == client { panic ( " " ) } options := parse ( defaultRedisOptions ( ) , opts ... ) inst := & redisDispatcher { handlers : map [ Topic ] [ ] HandleFunc { } , clientWrapper : & clientWrapper { client : client } , options : options , } inst . start ( ctx ) return inst }
NewRedisWithContext create a redis redisDispatcher that relates to ctx, if ctx is cancelled, redisDispatcher will stop
NewRedisWithContext create a redis redisDispatcher that relates to ctx if ctx is cancelled redisDispatcher will stop