etaty / rediscala

Non-blocking, Reactive Redis driver for Scala (with Sentinel support)
Apache License 2.0
790 stars 142 forks source link

stop() not part of a trait #212

Open dlangdon opened 5 years ago

dlangdon commented 5 years ago

I'm attempting to use redis clients as polimorphic. For instance, by creating a client like this:

val client = {
    ...
    if(sentinelMaster.isEmpty)
      RedisClient(redisHost, redisPort)
    else
      SentinelMonitoredRedisClient(List(redisHost -> redisPort), sentinelMaster)
  }

but then, I can no longer do client.stop() since, while both types of clients have the method, it is not part of a common trait. Should be trivial to fix but I'm not familiar enough with the library yet, so I'm sure to break naming conventions.