Documentation
¶
Overview ¶
Package fakeredis is a tiny RESP2 fake server used by celeris middleware tests that adapt onto the native driver/redis client. Not for production use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a minimal in-process RESP2 server that implements a subset of commands sufficient for middleware store adapters: GET, SET, DEL, SETEX, EXPIRE, PEXPIRE, TTL, PTTL, EXISTS, GETDEL, SCAN, HMSET, HMGET, HGET, HSET, HEXPIRE, PING, AUTH, HELLO, SELECT, SCRIPT LOAD, EVAL, EVALSHA.
Use Start to spin one up on a random loopback port; the testing.TB Cleanup hook closes the listener when the test ends.
func (*Server) Data ¶
Data returns a copy of current string-keyed entries. For test assertions only.