top

Package miniredis is a pure Go Redis test server, for use in Go unittests. There are no dependencies on system binaries, and every server you start will be empty.

Start a server with `s, err := miniredis.Run()`. Stop it with `defer s.Close()`.

Point your Redis client to `s.Addr()` or `s.Host(), s.Port()`.

Set keys directly via s.Set(...) and similar commands, or use a Redis client.

For direct use you can select a Redis database with either `s.Select(12); s.Get("foo")` or `s.DB(12).Get("foo")`.

Imported by 2 package(s)

  1. github.com/alicebob/miniredis_vs_redis
  2. github.com/phedoreanu/counter/mockdb

Imported only in test by 64 package(s)

  1. github.com/AlphaPerfect/codis/pkg/proxy/router
  2. github.com/CodisLabs/codis/pkg/proxy
  3. github.com/EPICPaaS/codis/pkg/proxy/router
  4. github.com/Neeke/codis/pkg/proxy
  5. github.com/ahjdzx/codis/pkg/proxy/router
  6. github.com/alicebob/shredis
  7. github.com/caoxiaolin/codis/pkg/proxy/router
  8. github.com/cch123/codis/pkg/proxy
  9. github.com/citysir/codis/pkg/proxy/router
  10. github.com/cloudaice/codis/pkg/proxy/router
  11. github.com/corestoreio/csfw/net/geoip/backendgeoip
  12. github.com/corestoreio/csfw/net/geoip/maxmindwebservice
  13. github.com/corestoreio/csfw/storage/transcache
  14. github.com/dalent/codis/pkg/proxy
  15. github.com/diegogub/codis/pkg/proxy/router
  16. github.com/dongzerun/codis/pkg/proxy/router
  17. github.com/eddyzhou/miniredis
  18. github.com/elvin-du/codis/pkg/proxy/router
  19. github.com/elvuel/codis/pkg/proxy/router
  20. github.com/godeep/codis/pkg/proxy/router
  21. github.com/guilhem/codis/pkg/proxy
  22. github.com/henrylee2cn/codis/pkg/proxy
  23. github.com/insionng/codis-ha
  24. github.com/jmatrix/codis/pkg/proxy/router
  25. github.com/kitech/codis/pkg/proxy/router
  26. github.com/kmiku7/codis-annotated/pkg/proxy
  27. github.com/legendtkl/codis/pkg/proxy
  28. github.com/liujianping/codis/pkg/proxy/router
  29. github.com/liusongsen/codis/pkg/proxy
  30. github.com/liutaihua/codis/pkg/proxy
  31. github.com/liuvictory99/codis/pkg/proxy
  32. github.com/lostz/codis/pkg/proxy/router
  33. github.com/louishust/codis/pkg/proxy/router
  34. github.com/love4j/codis/pkg/proxy/router
  35. github.com/magicshui/csfw/storage/transcache
  36. github.com/mathisonqin/codis/pkg/proxy/router
  37. github.com/maxid/codis/pkg/proxy
  38. github.com/miffa/cmkvs/codis-ha
  39. github.com/molibei/codis/pkg/proxy/router
  40. github.com/mynetstudy/codis/pkg/proxy
  41. github.com/ngaut/codis-ha
  42. github.com/ngaut/codis/pkg/proxy/router
  43. github.com/nproc/acl-go/driver/redis
  44. github.com/ohlinux/codis/pkg/proxy/router
  45. github.com/pims/miniredis
  46. github.com/probestar/codis/pkg/proxy
  47. github.com/qgweb/codis/pkg/proxy
  48. github.com/radioinmyhead/codis/pkg/proxy
  49. github.com/satanson/codis/pkg/proxy
  50. github.com/shenshouer/codis-ha
  51. github.com/shorrockin/miniredis
  52. github.com/siddontang/codis/pkg/proxy/router
  53. github.com/siddontang/goredis
  54. github.com/silentred/codis/pkg/proxy
  55. github.com/tukdesk/goredis
  56. github.com/upton/codis/pkg/proxy/router
  57. github.com/wandoulabs/codis-ha
  58. github.com/wangbinxiang/codis/pkg/proxy/router
  59. github.com/wangcheng711/codis/pkg/proxy/router
  60. github.com/wlibo666/codis-ha
  61. github.com/wlibo666/codis/pkg/proxy
  62. github.com/yangzhe1991/codis/pkg/proxy/router
  63. github.com/zhwq001/codis/pkg/proxy
  64. github.com/zimulala/codis/pkg/proxy/router

Imports 1 package(s)

  1. github.com/bsm/redeo

Test imports 1 package(s)

  1. github.com/garyburd/redigo/redis