summaryrefslogtreecommitdiff
path: root/vendor/nmred/kafka-php/src/Kafka/ClusterMetaData.php
blob: e9b3d064b858a01efb9c6ad0c0926a80c2d2856f (plain)
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
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
// +---------------------------------------------------------------------------
// | SWAN [ $_SWANBR_SLOGAN_$ ]
// +---------------------------------------------------------------------------
// | Copyright $_SWANBR_COPYRIGHT_$
// +---------------------------------------------------------------------------
// | Version  $_SWANBR_VERSION_$
// +---------------------------------------------------------------------------
// | Licensed ( $_SWANBR_LICENSED_URL_$ )
// +---------------------------------------------------------------------------
// | $_SWANBR_WEB_DOMAIN_$
// +---------------------------------------------------------------------------

namespace Kafka;

/**
+------------------------------------------------------------------------------
* Metadata about the kafka cluster
+------------------------------------------------------------------------------
*
* @package
* @version $_SWANBR_VERSION_$
* @copyright Copyleft
* @author ebernhardson@wikimedia.org
+------------------------------------------------------------------------------
*/

interface ClusterMetaData
{
    /**
     * get broker list from kafka metadata
     *
     * @access public
     * @return array
     */
    public function listBrokers();

    /**
     * @param string $topicName
     * @param integer $partitionId
     * @access public
     * @return array
     */
    public function getPartitionState($topicName, $partitionId = 0);

    /**
     * @param string $topicName
     * @access public
     * @return array
     */
    public function getTopicDetail($topicName);
}