OffBroadwayRedisStream.RedisClient behaviour (off_broadway_redis_stream v0.1.1) View Source

Link to this section Summary

Link to this section Types

Specs

id() :: String.t()

Specs

message() :: [any()]

Link to this section Callbacks

Specs

ack(ids :: [id()], config :: keyword()) ::
  :ok
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}
Link to this callback

claim(idle, ids, config)

View Source

Specs

claim(idle :: pos_integer(), ids :: [id()], config :: keyword()) ::
  {:ok, messages :: [message()]}
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}

Specs

consumers_info(config :: keyword()) ::
  {:ok, any()}
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}
Link to this callback

create_group(offset, config)

View Source

Specs

create_group(offset :: String.t(), config :: keyword()) ::
  :ok
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}
Link to this callback

delete_consumers(consumers, config)

View Source

Specs

delete_consumers(consumers :: [String.t()], config :: keyword()) ::
  :ok
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}
Link to this callback

fetch(demand, last_id, config)

View Source

Specs

fetch(demand :: pos_integer(), last_id :: id(), config :: keyword()) ::
  {:ok, messages :: [message()]}
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}

Specs

init(config :: keyword()) :: {:ok, any()} | {:error, any()}
Link to this callback

pending(consumer, count, config)

View Source

Specs

pending(consumer :: String.t(), count :: pos_integer(), config :: keyword()) ::
  {:ok, any()}
  | {:error, OffBroadwayRedisStream.RedisClient.ConnectionError.t()}
  | {:error, any()}