-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathRedis.php
55 lines (44 loc) · 1.07 KB
/
Redis.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
declare(strict_types=1);
namespace Enqueue\Redis;
interface Redis
{
/**
* @throws ServerException
*/
public function eval(string $script, array $keys = [], array $args = []);
/**
* @throws ServerException
*/
public function zadd(string $key, string $value, float $score): int;
/**
* @throws ServerException
*/
public function zrem(string $key, string $value): int;
/**
* @throws ServerException
*
* @return int length of the list
*/
public function lpush(string $key, string $value): int;
/**
* @param string[] $keys
* @param int $timeout in seconds
*
* @throws ServerException
*/
public function brpop(array $keys, int $timeout): ?RedisResult;
/**
* @throws ServerException
*/
public function rpop(string $key): ?RedisResult;
/**
* @throws ServerException
*/
public function connect(): void;
public function disconnect(): void;
/**
* @throws ServerException
*/
public function del(string $key): void;
}