Skip to content

Commit

Permalink
Change doxygen groups order
Browse files Browse the repository at this point in the history
  • Loading branch information
emasab authored and mahajanadhitya committed Oct 11, 2023
1 parent 1e88fd1 commit 9f3de7f
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 140 deletions.
174 changes: 86 additions & 88 deletions src/rdkafka.h
Original file line number Diff line number Diff line change
Expand Up @@ -7127,94 +7127,6 @@ typedef enum rd_kafka_AclOperation_t {

/**@}*/


/**
* @name ListOffsets API
* @brief Given a topic_partition list, provides the offset information.
* @{
*/

/**
* @enum rd_kafka_OffsetSpec_t
* @brief Allows to specify the desired offsets when using ListOffsets.
*/
typedef enum rd_kafka_OffsetSpec_t {
/* Used to retrieve the offset with the largest timestamp of a partition
* as message timestamps can be specified client side this may not match
* the log end offset returned by SPEC_LATEST.
*/
RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP = -3,
/* Used to retrieve the offset with the earliest timestamp of a
partition. */
RD_KAFKA_OFFSET_SPEC_EARLIEST = -2,
/* Used to retrieve the offset with the latest timestamp of a partition.
*/
RD_KAFKA_OFFSET_SPEC_LATEST = -1,
} rd_kafka_OffsetSpec_t;

/**
* @brief Information returned from a ListOffsets call for a specific
* `rd_kafka_topic_partition_t`.
*/
typedef struct rd_kafka_ListOffsetsResultInfo_s
rd_kafka_ListOffsetsResultInfo_t;

/**
* @brief Returns the topic partition of the passed \p result_info.
*/
RD_EXPORT
const rd_kafka_topic_partition_t *
rd_kafka_ListOffsetsResultInfo_topic_partition(
const rd_kafka_ListOffsetsResultInfo_t *result_info);

/**
* @brief Returns the timestamp corresponding to the offset in \p result_info.
*/
RD_EXPORT
int64_t rd_kafka_ListOffsetsResultInfo_timestamp(
const rd_kafka_ListOffsetsResultInfo_t *result_info);

/**
* @brief Returns the array of ListOffsetsResultInfo in \p result
* and populates the size of the array in \p cntp.
*/
RD_EXPORT
const rd_kafka_ListOffsetsResultInfo_t **
rd_kafka_ListOffsets_result_infos(const rd_kafka_ListOffsets_result_t *result,
size_t *cntp);

/**
* @brief List offsets for the specified \p topic_partitions.
* This operation enables to find the beginning offset,
* end offset as well as the offset matching a timestamp in partitions
* or the offset with max timestamp.
*
* @param rk Client instance.
* @param topic_partitions topic_partition_list_t with the partitions and
* offsets to list. Each topic partition offset can be
* a value of the `rd_kafka_OffsetSpec_t` enum or
* a non-negative value, representing a timestamp,
* to query for the first offset after the
* given timestamp.
* @param options Optional admin options, or NULL for defaults.
* @param rkqu Queue to emit result on.
*
* Supported admin options:
* - rd_kafka_AdminOptions_set_isolation_level() - default \c
* RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED
* - rd_kafka_AdminOptions_set_request_timeout() - default socket.timeout.ms
*
* @remark The result event type emitted on the supplied queue is of type
* \c RD_KAFKA_EVENT_LISTOFFSETS_RESULT
*/
RD_EXPORT
void rd_kafka_ListOffsets(rd_kafka_t *rk,
rd_kafka_topic_partition_list_t *topic_partitions,
const rd_kafka_AdminOptions_t *options,
rd_kafka_queue_t *rkqu);

/**@}*/

/**
* @name Admin API - Topics
* @brief Topic related operations.
Expand Down Expand Up @@ -9155,6 +9067,92 @@ rd_kafka_DeleteConsumerGroupOffsets_result_groups(

/**@}*/

/**
* @name Admin API - ListOffsets
* @brief Given a topic_partition list, provides the offset information.
* @{
*/

/**
* @enum rd_kafka_OffsetSpec_t
* @brief Allows to specify the desired offsets when using ListOffsets.
*/
typedef enum rd_kafka_OffsetSpec_t {
/* Used to retrieve the offset with the largest timestamp of a partition
* as message timestamps can be specified client side this may not match
* the log end offset returned by SPEC_LATEST.
*/
RD_KAFKA_OFFSET_SPEC_MAX_TIMESTAMP = -3,
/* Used to retrieve the offset with the earliest timestamp of a
partition. */
RD_KAFKA_OFFSET_SPEC_EARLIEST = -2,
/* Used to retrieve the offset with the latest timestamp of a partition.
*/
RD_KAFKA_OFFSET_SPEC_LATEST = -1,
} rd_kafka_OffsetSpec_t;

/**
* @brief Information returned from a ListOffsets call for a specific
* `rd_kafka_topic_partition_t`.
*/
typedef struct rd_kafka_ListOffsetsResultInfo_s
rd_kafka_ListOffsetsResultInfo_t;

/**
* @brief Returns the topic partition of the passed \p result_info.
*/
RD_EXPORT
const rd_kafka_topic_partition_t *
rd_kafka_ListOffsetsResultInfo_topic_partition(
const rd_kafka_ListOffsetsResultInfo_t *result_info);

/**
* @brief Returns the timestamp corresponding to the offset in \p result_info.
*/
RD_EXPORT
int64_t rd_kafka_ListOffsetsResultInfo_timestamp(
const rd_kafka_ListOffsetsResultInfo_t *result_info);

/**
* @brief Returns the array of ListOffsetsResultInfo in \p result
* and populates the size of the array in \p cntp.
*/
RD_EXPORT
const rd_kafka_ListOffsetsResultInfo_t **
rd_kafka_ListOffsets_result_infos(const rd_kafka_ListOffsets_result_t *result,
size_t *cntp);

/**
* @brief List offsets for the specified \p topic_partitions.
* This operation enables to find the beginning offset,
* end offset as well as the offset matching a timestamp in partitions
* or the offset with max timestamp.
*
* @param rk Client instance.
* @param topic_partitions topic_partition_list_t with the partitions and
* offsets to list. Each topic partition offset can be
* a value of the `rd_kafka_OffsetSpec_t` enum or
* a non-negative value, representing a timestamp,
* to query for the first offset after the
* given timestamp.
* @param options Optional admin options, or NULL for defaults.
* @param rkqu Queue to emit result on.
*
* Supported admin options:
* - rd_kafka_AdminOptions_set_isolation_level() - default \c
* RD_KAFKA_ISOLATION_LEVEL_READ_UNCOMMITTED
* - rd_kafka_AdminOptions_set_request_timeout() - default socket.timeout.ms
*
* @remark The result event type emitted on the supplied queue is of type
* \c RD_KAFKA_EVENT_LISTOFFSETS_RESULT
*/
RD_EXPORT
void rd_kafka_ListOffsets(rd_kafka_t *rk,
rd_kafka_topic_partition_list_t *topic_partitions,
const rd_kafka_AdminOptions_t *options,
rd_kafka_queue_t *rkqu);

/**@}*/

/**
* @name Admin API - User SCRAM credentials
Expand Down
111 changes: 59 additions & 52 deletions src/rdkafka_admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,47 @@ struct rd_kafka_DeleteRecords_s {

/**@}*/

/**
* @name ListConsumerGroupOffsets
* @{
*/

/**
* @brief ListConsumerGroupOffsets result
*/
struct rd_kafka_ListConsumerGroupOffsets_result_s {
rd_list_t groups; /**< Type (rd_kafka_group_result_t *) */
};

struct rd_kafka_ListConsumerGroupOffsets_s {
char *group_id; /**< Points to data */
rd_kafka_topic_partition_list_t *partitions;
char data[1]; /**< The group id is allocated along with
* the struct here. */
};

/**@}*/

/**
* @name AlterConsumerGroupOffsets
* @{
*/

/**
* @brief AlterConsumerGroupOffsets result
*/
struct rd_kafka_AlterConsumerGroupOffsets_result_s {
rd_list_t groups; /**< Type (rd_kafka_group_result_t *) */
};

struct rd_kafka_AlterConsumerGroupOffsets_s {
char *group_id; /**< Points to data */
rd_kafka_topic_partition_list_t *partitions;
char data[1]; /**< The group id is allocated along with
* the struct here. */
};

/**@}*/

/**
* @name DeleteConsumerGroupOffsets
Expand All @@ -336,6 +377,24 @@ struct rd_kafka_DeleteConsumerGroupOffsets_s {

/**@}*/

/**
* @name ListOffsets
* @{
*/

/**
* @struct ListOffsets result about a single partition
*/
struct rd_kafka_ListOffsetsResultInfo_s {
rd_kafka_topic_partition_t *topic_partition;
int64_t timestamp;
};

rd_kafka_ListOffsetsResultInfo_t *
rd_kafka_ListOffsetsResultInfo_new(rd_kafka_topic_partition_t *rktpar,
rd_ts_t timestamp);
/**@}*/

/**
* @name CreateAcls
* @{
Expand Down Expand Up @@ -373,50 +432,6 @@ struct rd_kafka_DeleteAcls_result_response_s {

/**@}*/


/**
* @name AlterConsumerGroupOffsets
* @{
*/

/**
* @brief AlterConsumerGroupOffsets result
*/
struct rd_kafka_AlterConsumerGroupOffsets_result_s {
rd_list_t groups; /**< Type (rd_kafka_group_result_t *) */
};

struct rd_kafka_AlterConsumerGroupOffsets_s {
char *group_id; /**< Points to data */
rd_kafka_topic_partition_list_t *partitions;
char data[1]; /**< The group id is allocated along with
* the struct here. */
};

/**@}*/


/**
* @name ListConsumerGroupOffsets
* @{
*/

/**
* @brief ListConsumerGroupOffsets result
*/
struct rd_kafka_ListConsumerGroupOffsets_result_s {
rd_list_t groups; /**< Type (rd_kafka_group_result_t *) */
};

struct rd_kafka_ListConsumerGroupOffsets_s {
char *group_id; /**< Points to data */
rd_kafka_topic_partition_list_t *partitions;
char data[1]; /**< The group id is allocated along with
* the struct here. */
};

/**@}*/

/**
* @name ListConsumerGroups
* @{
Expand Down Expand Up @@ -499,14 +514,6 @@ struct rd_kafka_ConsumerGroupDescription_s {
rd_kafka_error_t *error;
};

struct rd_kafka_ListOffsetsResultInfo_s {
rd_kafka_topic_partition_t *topic_partition;
int64_t timestamp;
};

rd_kafka_ListOffsetsResultInfo_t *
rd_kafka_ListOffsetsResultInfo_new(rd_kafka_topic_partition_t *rktpar,
rd_ts_t timestamp);
/**@}*/

/**
Expand Down

0 comments on commit 9f3de7f

Please sign in to comment.