Coffrify.Runtime.Idempotency.Redis (Coffrify v0.9.0)

View Source

Redis-backed idempotency store. Pass any Redix-compatible PID (or registered name) under :conn.

Example

{:ok, conn} = Redix.start_link("redis://localhost:6379")
store = Coffrify.Runtime.Idempotency.Redis.new(conn: conn, prefix: "myapp:cof:idem:")
client = Coffrify.new(api_key: key, idempotency_store: store)

Summary

Functions

Build the adapter struct.

Types

t()

@type t() :: %Coffrify.Runtime.Idempotency.Redis{
  conn: pid() | atom(),
  prefix: String.t()
}

Functions

new(opts)

@spec new(keyword()) :: t()

Build the adapter struct.