Skip to content

Commit

Permalink
Enable Redis Stream function
Browse files Browse the repository at this point in the history
  • Loading branch information
andiechang committed May 7, 2020
1 parent cfc0927 commit 1f3dd83
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/redis/src/Connection/Connection.php
Expand Up @@ -137,6 +137,19 @@
* @method void subscribe(array $channels, string|array $callback)
* @method array geoRadius(string $key, float $longitude, float $latitude, float $radius, string $radiusUnit, array $options)
* @method bool expireAt(string $key, int $timestamp)
* @method integer xAck(string $stream_key, string $group, array $id_list)
* @method string xAdd(string $stream_key, string $id, array $message, int $max_len, bool $approximate)
* @method string xClaim(string $stream_key, string $group, string $consumer, string $min_idle_time, array $id_list, array $options)
* @method string xDel(string $stream_key, array $id_list)
* @method string xGroup() @TODO
* @method string xInfo() @TODO
* @method integer xLen(string $stream_key)
* @method array xPending(string $stream_key, string $group, string $start, string $end, int $count, string $consumer)
* @method array xRange(string $stream_key, string $start, string $end, int $count)
* @method array xRevRange(string $stream_key, string $end, string $start, int $count)
* @method array xRead(array|string $stream_keys, int $count, int $block)
* @method array xReadGroup(string $group, string consumer, array|string $stream_keys, int $count, int $block)
* @method integer xTrim(string $stream_key, int $max_len, bool $approximate)
*/
abstract class Connection extends AbstractConnection implements ConnectionInterface
{
Expand Down Expand Up @@ -272,7 +285,20 @@ abstract class Connection extends AbstractConnection implements ConnectionInterf
'punsubscribe',
'subscribe',
'unsubscribe',
'expireat'
'expireat',
'xack',
'xadd',
'xclaim',
'xdel',
'xgroup',
'xinfo',
'xlen',
'xpending',
'xrange',
'xread',
'xreadgroup',
'xrevrange',
'xtrim',
];

/**
Expand Down
13 changes: 13 additions & 0 deletions src/redis/src/Redis.php
Expand Up @@ -138,6 +138,19 @@
* @method static void subscribe(array $channels, string|array $callback)
* @method static array geoRadius(string $key, float $longitude, float $latitude, float $radius, string $radiusUnit, array $options)
* @method static bool expireAt(string $key, int $timestamp)
* @method static integer xAck(string $stream_key, string $group, array $id_list)
* @method static string xAdd(string $stream_key, string $id, array $message, int $max_len, bool $approximate)
* @method static string xClaim(string $stream_key, string $group, string $consumer, string $min_idle_time, array $id_list, array $options)
* @method static string xDel(string $stream_key, array $id_list)
* @method static string xGroup() @TODO
* @method static string xInfo() @TODO
* @method static integer xLen(string $stream_key)
* @method static array xPending(string $stream_key, string $group, string $start, string $end, int $count, string $consumer)
* @method static array xRange(string $stream_key, string $start, string $end, int $count)
* @method static array xRevRange(string $stream_key, string $end, string $start, int $count)
* @method static array xRead(array|string $stream_keys, int $count, int $block)
* @method static array xReadGroup(string $group, string consumer, array|string $stream_keys, int $count, int $block)
* @method static integer xTrim(string $stream_key, int $max_len, bool $approximate)
*/
class Redis
{
Expand Down

0 comments on commit 1f3dd83

Please sign in to comment.