forked from arnaud-lb/php-rdkafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
topic.stub.php
68 lines (52 loc) · 2 KB
/
topic.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
<?php
/**
* @generate-class-entries
* @generate-function-entries
* @generate-legacy-arginfo
*/
namespace RdKafka;
abstract class Topic
{
/** @tentative-return-type */
public function getName(): string {}
}
class ConsumerTopic extends Topic
{
/** @implementation-alias RdKafka::__construct */
private function __construct() {}
/** @tentative-return-type */
public function consumeQueueStart(int $partition, int $offset, Queue $queue): void {}
/** @tentative-return-type */
public function consumeCallback(int $partition, int $timeout_ms, callable $callback): int {}
/** @tentative-return-type */
public function consumeStart(int $partition, int $offset): void {}
/** @tentative-return-type */
public function consumeStop(int $partition): void {}
/** @tentative-return-type */
public function consume(int $partition, int $timeout_ms): ?Message {}
/** @tentative-return-type */
public function consumeBatch(int $partition, int $timeout_ms, int $batch_size): array {}
/** @tentative-return-type */
public function offsetStore(int $partition, int $offset): void {}
}
class KafkaConsumerTopic extends Topic
{
/** @implementation-alias RdKafka::__construct */
private function __construct() {}
/**
* @implementation-alias RdKafka\ConsumerTopic::offsetStore
* @tentative-return-type
*/
public function offsetStore(int $partition, int $offset): void {}
}
class ProducerTopic extends Topic
{
/** @implementation-alias RdKafka::__construct */
private function __construct() {}
/** @tentative-return-type */
public function produce(int $partition, int $msgflags, ?string $payload = null, ?string $key = null, ?string $msg_opaque = null): void {}
#ifdef HAVE_RD_KAFKA_MESSAGE_HEADERS
/** @tentative-return-type */
public function producev(int $partition, int $msgflags, ?string $payload = null, ?string $key = null, ?array $headers = null, ?int $timestamp_ms = null, ?string $msg_opaque = null): void {}
#endif
}