redis_client.go 232 B

1234567891011121314
  1. package sredis
  2. import "github.com/gomodule/redigo/redis"
  3. var MasterPool *redis.Pool
  4. var SalvePool *redis.Pool
  5. func GetMasterCon() redis.Conn {
  6. return MasterPool.Get()
  7. }
  8. func GetSalveCon() redis.Conn {
  9. return SalvePool.Get()
  10. }