plugins/out_kafka/librdkafka-1.5.0/src/rdkafka_admin.c
static void rd_kafka_AdminOptions_init (rd_kafka_t *rk,
                                        rd_kafka_AdminOptions_t *options) {
        rd_kafka_confval_init_int(&options->request_timeout, "request_timeout",
                                  0, 3600*1000,
                                  rk->rk_conf.admin.request_timeout_ms);

        if (options->for_api == RD_KAFKA_ADMIN_OP_ANY ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATETOPICS ||
            options->for_api == RD_KAFKA_ADMIN_OP_DELETETOPICS ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATEPARTITIONS)
                rd_kafka_confval_init_int(&options->operation_timeout,
                                          "operation_timeout",
                                          -1, 3600*1000, 0);
        else
                rd_kafka_confval_disable(&options->operation_timeout,
                                         "operation_timeout");

        if (options->for_api == RD_KAFKA_ADMIN_OP_ANY ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATETOPICS ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATEPARTITIONS ||
            options->for_api == RD_KAFKA_ADMIN_OP_ALTERCONFIGS)
                rd_kafka_confval_init_int(&options->validate_only,
                                          "validate_only",
                                          0, 1, 0);
        else
                rd_kafka_confval_disable(&options->validate_only,
                                         "validate_only");

        if (options->for_api == RD_KAFKA_ADMIN_OP_ANY ||
            options->for_api == RD_KAFKA_ADMIN_OP_ALTERCONFIGS)
                rd_kafka_confval_init_int(&options->incremental,
                                          "incremental",
                                          0, 1, 0);
        else
                rd_kafka_confval_disable(&options->incremental,
                                         "incremental");

        rd_kafka_confval_init_int(&options->broker, "broker",
                                  0, INT32_MAX, -1);
        rd_kafka_confval_init_ptr(&options->opaque, "opaque");
}
/**
 * @brief Initialize and set up defaults for AdminOptions
 */
@brief Initialize and set up defaults for AdminOptions
@brief Initialize and set up defaults for AdminOptions
static void rd_kafka_AdminOptions_init (rd_kafka_t *rk,
                                        rd_kafka_AdminOptions_t *options) {
        rd_kafka_confval_init_int(&options->request_timeout, "request_timeout",
                                  0, 3600*1000,
                                  rk->rk_conf.admin.request_timeout_ms);
        if (options->for_api == RD_KAFKA_ADMIN_OP_ANY ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATETOPICS ||
            options->for_api == RD_KAFKA_ADMIN_OP_DELETETOPICS ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATEPARTITIONS)
                rd_kafka_confval_init_int(&options->operation_timeout,
                                          "operation_timeout",
                                          -1, 3600*1000, 0);
        else
                rd_kafka_confval_disable(&options->operation_timeout,
                                         "operation_timeout");
        if (options->for_api == RD_KAFKA_ADMIN_OP_ANY ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATETOPICS ||
            options->for_api == RD_KAFKA_ADMIN_OP_CREATEPARTITIONS ||
            options->for_api == RD_KAFKA_ADMIN_OP_ALTERCONFIGS)
                rd_kafka_confval_init_int(&options->validate_only,
                                          "validate_only",
                                          0, 1, 0);
        else
                rd_kafka_confval_disable(&options->validate_only,
                                         "validate_only");
        if (options->for_api == RD_KAFKA_ADMIN_OP_ANY ||
            options->for_api == RD_KAFKA_ADMIN_OP_ALTERCONFIGS)
                rd_kafka_confval_init_int(&options->incremental,
                                          "incremental",
                                          0, 1, 0);
        else
                rd_kafka_confval_disable(&options->incremental,
                                         "incremental");
        rd_kafka_confval_init_int(&options->broker, "broker",
                                  0, INT32_MAX, -1);
        rd_kafka_confval_init_ptr(&options->opaque, "opaque");
}
static void rd_kafka_AdminOptions_init ( rd_kafka_t * rk , rd_kafka_AdminOptions_t * options ) { rd_kafka_confval_init_int ( & options -> request_timeout , " " , 0 , 3600 * 1000 , rk -> rk_conf . admin . request_timeout_ms ) ; if ( options -> for_api == RD_KAFKA_ADMIN_OP_ANY || options -> for_api == RD_KAFKA_ADMIN_OP_CREATETOPICS || options -> for_api == RD_KAFKA_ADMIN_OP_DELETETOPICS || options -> for_api == RD_KAFKA_ADMIN_OP_CREATEPARTITIONS ) rd_kafka_confval_init_int ( & options -> operation_timeout , " " , -1 , 3600 * 1000 , 0 ) ; else rd_kafka_confval_disable ( & options -> operation_timeout , " " ) ; if ( options -> for_api == RD_KAFKA_ADMIN_OP_ANY || options -> for_api == RD_KAFKA_ADMIN_OP_CREATETOPICS || options -> for_api == RD_KAFKA_ADMIN_OP_CREATEPARTITIONS || options -> for_api == RD_KAFKA_ADMIN_OP_ALTERCONFIGS ) rd_kafka_confval_init_int ( & options -> validate_only , " " , 0 , 1 , 0 ) ; else rd_kafka_confval_disable ( & options -> validate_only , " " ) ; if ( options -> for_api == RD_KAFKA_ADMIN_OP_ANY || options -> for_api == RD_KAFKA_ADMIN_OP_ALTERCONFIGS ) rd_kafka_confval_init_int ( & options -> incremental , " " , 0 , 1 , 0 ) ; else rd_kafka_confval_disable ( & options -> incremental , " " ) ; rd_kafka_confval_init_int ( & options -> broker , " " , 0 , INT32_MAX , -1 ) ; rd_kafka_confval_init_ptr ( & options -> opaque , " " ) ; }
@brief Initialize and set up defaults for AdminOptions
@brief Initialize and set up defaults for AdminOptions