Vdr.WatchEvent.Update (veidrodelis v0.1.8)

Copy Markdown View Source

Notification sent when a watched key is modified by a Redis command.

Contains the command that modified the key and the database number where the modification occurred.

Fields

  • command - The Redis command struct that modified the key (from Vdr.RedisStream.Command)
  • db - The database number where the modification occurred

Example

When a watcher receives this message:

  receive do
    {ref, %Vdr.WatchEvent.Update{command: cmd, db: db}} ->
      # Handle the update
      IO.inspect({ref, cmd, db})
  end

Summary

Types

t()

@type t() :: %Vdr.WatchEvent.Update{command: tuple(), db: non_neg_integer()}