-
-
Notifications
You must be signed in to change notification settings - Fork 265
/
rdkafka.stub.php
113 lines (83 loc) · 3.36 KB
/
rdkafka.stub.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
* @generate-class-entries
* @generate-function-entries
* @generate-legacy-arginfo
*/
namespace {
abstract class RdKafka {
private ?callable $error_cb;
private ?callable $dr_cb;
private function __construct() {}
/** @tentative-return-type */
public function addBrokers(string $broker_list): int {}
/** @tentative-return-type */
public function getMetadata(bool $all_topics, ?RdKafka\Topic $only_topic, int $timeout_ms): RdKafka\Metadata {}
/** @tentative-return-type */
public function getControllerId(int $timeout_ms): int {}
/** @tentative-return-type */
public function getOutQLen(): int {}
/**
* @alias RdKafka::getMetadata
* @deprecated
* @tentative-return-type
*/
public function metadata(bool $all_topics, ?RdKafka\Topic $only_topic, int $timeout_ms): RdKafka\Metadata {}
/**
* @deprecated
* @tentative-return-type
*/
public function setLogLevel(int $level): void {}
/** @tentative-return-type */
public function newTopic(string $topic_name, ?RdKafka\TopicConf $topic_conf = null): RdKafka\Topic {}
/**
* @alias RdKafka::getOutQLen
* @deprecated
* @tentative-return-type
*/
public function outqLen(): int {}
/** @tentative-return-type */
public function poll(int $timeout_ms): int {}
/** @tentative-return-type */
public function flush(int $timeout_ms): int {}
/** @tentative-return-type */
public function purge(int $purge_flags): int {}
/**
* @deprecated
* @tentative-return-type
*/
public function setLogger(int $logger): void {}
/** @tentative-return-type */
public function queryWatermarkOffsets(string $topic, int $partition, int &$low, int &$high, int $timeout_ms): void {}
/** @tentative-return-type */
public function offsetsForTimes(array $topic_partitions, int $timeout_ms): array {}
/** @tentative-return-type */
public function pausePartitions(array $topic_partitions): array {}
/** @tentative-return-type */
public function resumePartitions(array $topic_partitions): array {}
/** @tentative-return-type */
public function oauthbearerSetToken(string $token_value, int|float|string $lifetime_ms, string $principal_name, array $extensions = []): void {}
/** @tentative-return-type */
public function oauthbearerSetTokenFailure(string $error): void {}
}
}
namespace RdKafka {
class Exception extends \Exception {
}
class Consumer extends \RdKafka {
public function __construct(?Conf $conf = null) {}
/** @tentative-return-type */
public function newQueue(): Queue {}
}
class Producer extends \RdKafka {
public function __construct(?Conf $conf = null) {}
/** @tentative-return-type */
public function initTransactions(int $timeout_ms): void {}
/** @tentative-return-type */
public function beginTransaction(): void {}
/** @tentative-return-type */
public function commitTransaction(int $timeout_ms): void {}
/** @tentative-return-type */
public function abortTransaction(int $timeout_ms): void {}
}
}