MCPcopy
hub / github.com/redis/go-redis / cmdRecorder

Struct cmdRecorder

tx_unwatch_test.go:19–22  ·  view source on GitHub ↗

cmdRecorder captures the command stream a client sends so tests can assert the presence or absence of individual commands. UNWATCH from Tx.Close flows through ProcessHook; the MULTI/EXEC block flows through ProcessPipelineHook.

Source from the content-addressed store, hash-verified

17// the presence or absence of individual commands. UNWATCH from Tx.Close flows
18// through ProcessHook; the MULTI/EXEC block flows through ProcessPipelineHook.
19type cmdRecorder struct {
20 mu sync.Mutex
21 sent []string
22}
23
24func (h *cmdRecorder) record(names ...string) {
25 h.mu.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected