Skip to content

Commit

Permalink
Merge pull request #641 from confluentinc/import_v1.7.0
Browse files Browse the repository at this point in the history
Import librdkafka v1.7.0
  • Loading branch information
edenhill authored May 10, 2021
2 parents f0d7516 + b2e5208 commit 13ae115
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 52 deletions.
89 changes: 45 additions & 44 deletions kafka/api.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions kafka/build_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

package kafka

// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA
// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA -DLIBRDKAFKA_STATICLIB
// #cgo LDFLAGS: ${SRCDIR}/librdkafka_vendor/librdkafka_darwin.a -lz -lm -lsasl2 -ldl -lpthread
import "C"

// LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client
const LibrdkafkaLinkInfo = "static darwin from librdkafka-static-bundle-v1.6.1.tgz"
const LibrdkafkaLinkInfo = "static darwin from librdkafka-static-bundle-v1.7.0.tgz"
4 changes: 2 additions & 2 deletions kafka/build_glibc_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

package kafka

// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA
// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA -DLIBRDKAFKA_STATICLIB
// #cgo LDFLAGS: ${SRCDIR}/librdkafka_vendor/librdkafka_glibc_linux.a -lm -ldl -lpthread -lrt
import "C"

// LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client
const LibrdkafkaLinkInfo = "static glibc_linux from librdkafka-static-bundle-v1.6.1.tgz"
const LibrdkafkaLinkInfo = "static glibc_linux from librdkafka-static-bundle-v1.7.0.tgz"
4 changes: 2 additions & 2 deletions kafka/build_musl_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

package kafka

// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA
// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA -DLIBRDKAFKA_STATICLIB
// #cgo LDFLAGS: ${SRCDIR}/librdkafka_vendor/librdkafka_musl_linux.a -lm -ldl -lpthread -lrt -lpthread -lrt
import "C"

// LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client
const LibrdkafkaLinkInfo = "static musl_linux from librdkafka-static-bundle-v1.6.1.tgz"
const LibrdkafkaLinkInfo = "static musl_linux from librdkafka-static-bundle-v1.7.0.tgz"
13 changes: 13 additions & 0 deletions kafka/build_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// +build !dynamic


// This file was auto-generated by librdkafka_vendor/bundle-import.sh, DO NOT EDIT.

package kafka

// #cgo CFLAGS: -DUSE_VENDORED_LIBRDKAFKA -DLIBRDKAFKA_STATICLIB
// #cgo LDFLAGS: ${SRCDIR}/librdkafka_vendor/librdkafka_windows.a -lws2_32 -lsecur32 -lcrypt32
import "C"

// LibrdkafkaLinkInfo explains how librdkafka was linked to the Go client
const LibrdkafkaLinkInfo = "static windows from librdkafka-static-bundle-v1.7.0.tgz"
2 changes: 1 addition & 1 deletion kafka/generated_errors.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package kafka
// Copyright 2016-2021 Confluent Inc.
// AUTOMATICALLY GENERATED ON 2021-02-26 10:30:20.002504127 +0100 CET m=+0.000255761 USING librdkafka 1.6.1-dirty
// AUTOMATICALLY GENERATED ON 2021-05-10 11:33:08.588919179 +0200 CEST m=+0.000341587 USING librdkafka 1.7.0-dirty

/*
#include "select_rdkafka.h"
Expand Down
Binary file modified kafka/librdkafka_vendor/librdkafka_darwin.a
Binary file not shown.
Binary file modified kafka/librdkafka_vendor/librdkafka_glibc_linux.a
Binary file not shown.
Binary file modified kafka/librdkafka_vendor/librdkafka_musl_linux.a
Binary file not shown.
Binary file added kafka/librdkafka_vendor/librdkafka_windows.a
Binary file not shown.
58 changes: 57 additions & 1 deletion kafka/librdkafka_vendor/rdkafka.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ typedef SSIZE_T ssize_t;
* @remark This value should only be used during compile time,
* for runtime checks of version use rd_kafka_version()
*/
#define RD_KAFKA_VERSION 0x010601ff
#define RD_KAFKA_VERSION 0x010700ff

/**
* @brief Returns the librdkafka version as integer.
Expand Down Expand Up @@ -2311,6 +2311,25 @@ rd_kafka_conf_set_ssl_cert (rd_kafka_conf_t *conf,
char *errstr, size_t errstr_size);


/**
* @brief Set callback_data for OpenSSL engine.
*
* @param conf Configuration object.
* @param callback_data passed to engine callbacks,
* e.g. \c ENGINE_load_ssl_client_cert.
*
* @remark The \c ssl.engine.location configuration must be set for this
* to have affect.
*
* @remark The memory pointed to by \p value must remain valid for the
* lifetime of the configuration object and any Kafka clients that
* use it.
*/
RD_EXPORT
void rd_kafka_conf_set_engine_callback_data (rd_kafka_conf_t *conf,
void *callback_data);


/**
* @brief Sets the application's opaque pointer that will be passed to callbacks
*
Expand Down Expand Up @@ -3093,6 +3112,43 @@ rd_kafka_offsets_for_times (rd_kafka_t *rk,
int timeout_ms);



/**
* @brief Allocate and zero memory using the same allocator librdkafka uses.
*
* This is typically an abstraction for the calloc(3) call and makes sure
* the application can use the same memory allocator as librdkafka for
* allocating pointers that are used by librdkafka.
*
* \p rk can be set to return memory allocated by a specific \c rk instance
* otherwise pass NULL for \p rk.
*
* @remark Memory allocated by rd_kafka_mem_calloc() must be freed using
* rd_kafka_mem_free()
*/
RD_EXPORT
void *rd_kafka_mem_calloc (rd_kafka_t *rk, size_t num, size_t size);



/**
* @brief Allocate memory using the same allocator librdkafka uses.
*
* This is typically an abstraction for the malloc(3) call and makes sure
* the application can use the same memory allocator as librdkafka for
* allocating pointers that are used by librdkafka.
*
* \p rk can be set to return memory allocated by a specific \c rk instance
* otherwise pass NULL for \p rk.
*
* @remark Memory allocated by rd_kafka_mem_malloc() must be freed using
* rd_kafka_mem_free()
*/
RD_EXPORT
void *rd_kafka_mem_malloc (rd_kafka_t *rk, size_t size);



/**
* @brief Free pointer returned by librdkafka
*
Expand Down

0 comments on commit 13ae115

Please sign in to comment.