Documentation
¶
Overview ¶
Package enginetest serves fake projection and transport engines for adapter tests: a RESP endpoint (Redis, FalkorDB) with optional TLS, and the certificates to verify it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
Listen accepts loopback connections and hands each to serve until the test ends. It returns the listening address.
func ReadCommand ¶
ReadCommand reads one RESP array of bulk strings, or nil on anything else.
Types ¶
type RESPServer ¶
type RESPServer struct {
Addr string
Dials, Pings atomic.Int32
Stall atomic.Bool
Handshake, SocketClosed chan struct{}
}
RESPServer is a RESP endpoint that answers HELLO, AUTH, CLIENT and PING the way Redis and FalkorDB do, optionally behind TLS. Dials counts accepted sockets and Pings authenticated PINGs. With Stall set, a socket that starts a TLS handshake is held open: Handshake fires and the server reads until the client gives up, then SocketClosed fires.