View Source Chord.Utils.Redis.Client (Chord v0.1.3)

Wrapper around Redis commands to abstract interaction and enable easier testing.

Summary

Functions

Executes a Redis command.

Functions

command(command)

Executes a Redis command.

Depending on the configuration, this function will:

  • Interact with the named Redix process (using Process.whereis/1).
  • Use a mock module for testing.

Parameters

  • command (list): The Redis command to execute.

Returns

  • {:ok, result} on success.
  • {:error, reason} on failure.