@point3/node-rdkafka 3.6.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +20 -0
- package/README.md +636 -0
- package/binding.gyp +154 -0
- package/deps/librdkafka/.clang-format +136 -0
- package/deps/librdkafka/.clang-format-cpp +103 -0
- package/deps/librdkafka/.dir-locals.el +10 -0
- package/deps/librdkafka/.formatignore +33 -0
- package/deps/librdkafka/.gdbmacros +19 -0
- package/deps/librdkafka/.github/CODEOWNERS +1 -0
- package/deps/librdkafka/.github/ISSUE_TEMPLATE +34 -0
- package/deps/librdkafka/.semaphore/run-all-tests.yml +77 -0
- package/deps/librdkafka/.semaphore/semaphore-integration.yml +250 -0
- package/deps/librdkafka/.semaphore/semaphore.yml +378 -0
- package/deps/librdkafka/.semaphore/verify-linux-packages.yml +41 -0
- package/deps/librdkafka/CHANGELOG.md +2208 -0
- package/deps/librdkafka/CMakeLists.txt +291 -0
- package/deps/librdkafka/CODE_OF_CONDUCT.md +46 -0
- package/deps/librdkafka/CONFIGURATION.md +209 -0
- package/deps/librdkafka/CONTRIBUTING.md +431 -0
- package/deps/librdkafka/Doxyfile +2375 -0
- package/deps/librdkafka/INTRODUCTION.md +2481 -0
- package/deps/librdkafka/LICENSE +26 -0
- package/deps/librdkafka/LICENSE.cjson +22 -0
- package/deps/librdkafka/LICENSE.crc32c +28 -0
- package/deps/librdkafka/LICENSE.fnv1a +18 -0
- package/deps/librdkafka/LICENSE.hdrhistogram +27 -0
- package/deps/librdkafka/LICENSE.lz4 +26 -0
- package/deps/librdkafka/LICENSE.murmur2 +25 -0
- package/deps/librdkafka/LICENSE.nanopb +22 -0
- package/deps/librdkafka/LICENSE.opentelemetry +203 -0
- package/deps/librdkafka/LICENSE.pycrc +23 -0
- package/deps/librdkafka/LICENSE.queue +31 -0
- package/deps/librdkafka/LICENSE.regexp +5 -0
- package/deps/librdkafka/LICENSE.snappy +36 -0
- package/deps/librdkafka/LICENSE.tinycthread +26 -0
- package/deps/librdkafka/LICENSE.wingetopt +49 -0
- package/deps/librdkafka/LICENSES.txt +625 -0
- package/deps/librdkafka/Makefile +125 -0
- package/deps/librdkafka/README.md +199 -0
- package/deps/librdkafka/README.win32 +26 -0
- package/deps/librdkafka/STATISTICS.md +624 -0
- package/deps/librdkafka/configure +214 -0
- package/deps/librdkafka/configure.self +331 -0
- package/deps/librdkafka/debian/changelog +111 -0
- package/deps/librdkafka/debian/compat +1 -0
- package/deps/librdkafka/debian/control +71 -0
- package/deps/librdkafka/debian/copyright +99 -0
- package/deps/librdkafka/debian/gbp.conf +9 -0
- package/deps/librdkafka/debian/librdkafka++1.install +1 -0
- package/deps/librdkafka/debian/librdkafka-dev.examples +2 -0
- package/deps/librdkafka/debian/librdkafka-dev.install +9 -0
- package/deps/librdkafka/debian/librdkafka1.docs +5 -0
- package/deps/librdkafka/debian/librdkafka1.install +1 -0
- package/deps/librdkafka/debian/librdkafka1.symbols +135 -0
- package/deps/librdkafka/debian/rules +19 -0
- package/deps/librdkafka/debian/source/format +1 -0
- package/deps/librdkafka/debian/watch +2 -0
- package/deps/librdkafka/dev-conf.sh +123 -0
- package/deps/librdkafka/examples/CMakeLists.txt +79 -0
- package/deps/librdkafka/examples/Makefile +167 -0
- package/deps/librdkafka/examples/README.md +42 -0
- package/deps/librdkafka/examples/alter_consumer_group_offsets.c +338 -0
- package/deps/librdkafka/examples/consumer.c +271 -0
- package/deps/librdkafka/examples/delete_records.c +233 -0
- package/deps/librdkafka/examples/describe_cluster.c +322 -0
- package/deps/librdkafka/examples/describe_consumer_groups.c +455 -0
- package/deps/librdkafka/examples/describe_topics.c +427 -0
- package/deps/librdkafka/examples/elect_leaders.c +317 -0
- package/deps/librdkafka/examples/globals.json +11 -0
- package/deps/librdkafka/examples/idempotent_producer.c +344 -0
- package/deps/librdkafka/examples/incremental_alter_configs.c +347 -0
- package/deps/librdkafka/examples/kafkatest_verifiable_client.cpp +945 -0
- package/deps/librdkafka/examples/list_consumer_group_offsets.c +359 -0
- package/deps/librdkafka/examples/list_consumer_groups.c +365 -0
- package/deps/librdkafka/examples/list_offsets.c +327 -0
- package/deps/librdkafka/examples/misc.c +287 -0
- package/deps/librdkafka/examples/openssl_engine_example.cpp +248 -0
- package/deps/librdkafka/examples/producer.c +251 -0
- package/deps/librdkafka/examples/producer.cpp +228 -0
- package/deps/librdkafka/examples/rdkafka_complex_consumer_example.c +617 -0
- package/deps/librdkafka/examples/rdkafka_complex_consumer_example.cpp +467 -0
- package/deps/librdkafka/examples/rdkafka_consume_batch.cpp +264 -0
- package/deps/librdkafka/examples/rdkafka_example.c +853 -0
- package/deps/librdkafka/examples/rdkafka_example.cpp +679 -0
- package/deps/librdkafka/examples/rdkafka_performance.c +1781 -0
- package/deps/librdkafka/examples/transactions-older-broker.c +668 -0
- package/deps/librdkafka/examples/transactions.c +665 -0
- package/deps/librdkafka/examples/user_scram.c +491 -0
- package/deps/librdkafka/examples/win_ssl_cert_store.cpp +396 -0
- package/deps/librdkafka/lds-gen.py +73 -0
- package/deps/librdkafka/mainpage.doxy +40 -0
- package/deps/librdkafka/mklove/Makefile.base +329 -0
- package/deps/librdkafka/mklove/modules/configure.atomics +144 -0
- package/deps/librdkafka/mklove/modules/configure.base +2484 -0
- package/deps/librdkafka/mklove/modules/configure.builtin +70 -0
- package/deps/librdkafka/mklove/modules/configure.cc +186 -0
- package/deps/librdkafka/mklove/modules/configure.cxx +8 -0
- package/deps/librdkafka/mklove/modules/configure.fileversion +65 -0
- package/deps/librdkafka/mklove/modules/configure.gitversion +29 -0
- package/deps/librdkafka/mklove/modules/configure.good_cflags +18 -0
- package/deps/librdkafka/mklove/modules/configure.host +132 -0
- package/deps/librdkafka/mklove/modules/configure.lib +49 -0
- package/deps/librdkafka/mklove/modules/configure.libcurl +99 -0
- package/deps/librdkafka/mklove/modules/configure.libsasl2 +36 -0
- package/deps/librdkafka/mklove/modules/configure.libssl +147 -0
- package/deps/librdkafka/mklove/modules/configure.libzstd +58 -0
- package/deps/librdkafka/mklove/modules/configure.parseversion +95 -0
- package/deps/librdkafka/mklove/modules/configure.pic +16 -0
- package/deps/librdkafka/mklove/modules/configure.socket +20 -0
- package/deps/librdkafka/mklove/modules/configure.zlib +61 -0
- package/deps/librdkafka/mklove/modules/patches/README.md +8 -0
- package/deps/librdkafka/mklove/modules/patches/libcurl.0000-no-runtime-linking-check.patch +11 -0
- package/deps/librdkafka/mklove/modules/patches/libssl.0000-osx-rand-include-fix-OpenSSL-PR16409.patch +56 -0
- package/deps/librdkafka/packaging/RELEASE.md +319 -0
- package/deps/librdkafka/packaging/alpine/build-alpine.sh +38 -0
- package/deps/librdkafka/packaging/archlinux/PKGBUILD +30 -0
- package/deps/librdkafka/packaging/cmake/Config.cmake.in +37 -0
- package/deps/librdkafka/packaging/cmake/Modules/FindLZ4.cmake +38 -0
- package/deps/librdkafka/packaging/cmake/Modules/FindZSTD.cmake +27 -0
- package/deps/librdkafka/packaging/cmake/Modules/LICENSE.FindZstd +178 -0
- package/deps/librdkafka/packaging/cmake/README.md +38 -0
- package/deps/librdkafka/packaging/cmake/config.h.in +52 -0
- package/deps/librdkafka/packaging/cmake/parseversion.cmake +60 -0
- package/deps/librdkafka/packaging/cmake/rdkafka.pc.in +12 -0
- package/deps/librdkafka/packaging/cmake/try_compile/atomic_32_test.c +8 -0
- package/deps/librdkafka/packaging/cmake/try_compile/atomic_64_test.c +8 -0
- package/deps/librdkafka/packaging/cmake/try_compile/c11threads_test.c +14 -0
- package/deps/librdkafka/packaging/cmake/try_compile/crc32c_hw_test.c +27 -0
- package/deps/librdkafka/packaging/cmake/try_compile/dlopen_test.c +11 -0
- package/deps/librdkafka/packaging/cmake/try_compile/libsasl2_test.c +7 -0
- package/deps/librdkafka/packaging/cmake/try_compile/pthread_setname_darwin_test.c +6 -0
- package/deps/librdkafka/packaging/cmake/try_compile/pthread_setname_freebsd_test.c +7 -0
- package/deps/librdkafka/packaging/cmake/try_compile/pthread_setname_gnu_test.c +5 -0
- package/deps/librdkafka/packaging/cmake/try_compile/rand_r_test.c +7 -0
- package/deps/librdkafka/packaging/cmake/try_compile/rdkafka_setup.cmake +122 -0
- package/deps/librdkafka/packaging/cmake/try_compile/regex_test.c +10 -0
- package/deps/librdkafka/packaging/cmake/try_compile/strndup_test.c +5 -0
- package/deps/librdkafka/packaging/cmake/try_compile/sync_32_test.c +8 -0
- package/deps/librdkafka/packaging/cmake/try_compile/sync_64_test.c +8 -0
- package/deps/librdkafka/packaging/cp/README.md +16 -0
- package/deps/librdkafka/packaging/cp/check_features.c +72 -0
- package/deps/librdkafka/packaging/cp/verify-deb.sh +33 -0
- package/deps/librdkafka/packaging/cp/verify-packages.sh +69 -0
- package/deps/librdkafka/packaging/cp/verify-rpm.sh +32 -0
- package/deps/librdkafka/packaging/debian/changelog +66 -0
- package/deps/librdkafka/packaging/debian/compat +1 -0
- package/deps/librdkafka/packaging/debian/control +49 -0
- package/deps/librdkafka/packaging/debian/copyright +84 -0
- package/deps/librdkafka/packaging/debian/docs +5 -0
- package/deps/librdkafka/packaging/debian/gbp.conf +9 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.dirs +2 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.examples +2 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.install +6 -0
- package/deps/librdkafka/packaging/debian/librdkafka-dev.substvars +1 -0
- package/deps/librdkafka/packaging/debian/librdkafka.dsc +16 -0
- package/deps/librdkafka/packaging/debian/librdkafka1-dbg.substvars +1 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.dirs +1 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.install +2 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.postinst.debhelper +5 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.postrm.debhelper +5 -0
- package/deps/librdkafka/packaging/debian/librdkafka1.symbols +64 -0
- package/deps/librdkafka/packaging/debian/rules +19 -0
- package/deps/librdkafka/packaging/debian/source/format +1 -0
- package/deps/librdkafka/packaging/debian/watch +2 -0
- package/deps/librdkafka/packaging/get_version.py +21 -0
- package/deps/librdkafka/packaging/homebrew/README.md +15 -0
- package/deps/librdkafka/packaging/homebrew/brew-update-pr.sh +31 -0
- package/deps/librdkafka/packaging/mingw-w64/configure-build-msys2-mingw-static.sh +52 -0
- package/deps/librdkafka/packaging/mingw-w64/configure-build-msys2-mingw.sh +21 -0
- package/deps/librdkafka/packaging/mingw-w64/export-variables.sh +13 -0
- package/deps/librdkafka/packaging/mingw-w64/run-tests.sh +6 -0
- package/deps/librdkafka/packaging/mingw-w64/semaphoreci-build.sh +38 -0
- package/deps/librdkafka/packaging/nuget/README.md +84 -0
- package/deps/librdkafka/packaging/nuget/artifact.py +177 -0
- package/deps/librdkafka/packaging/nuget/cleanup-s3.py +143 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-win32__bldtype-Release/msvcr120.zip +0 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-win32__bldtype-Release/msvcr140.zip +0 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-x64__bldtype-Release/msvcr120.zip +0 -0
- package/deps/librdkafka/packaging/nuget/common/p-common__plat-windows__arch-x64__bldtype-Release/msvcr140.zip +0 -0
- package/deps/librdkafka/packaging/nuget/nuget.sh +21 -0
- package/deps/librdkafka/packaging/nuget/nugetpackage.py +278 -0
- package/deps/librdkafka/packaging/nuget/packaging.py +448 -0
- package/deps/librdkafka/packaging/nuget/push-to-nuget.sh +21 -0
- package/deps/librdkafka/packaging/nuget/release.py +167 -0
- package/deps/librdkafka/packaging/nuget/requirements.txt +3 -0
- package/deps/librdkafka/packaging/nuget/staticpackage.py +178 -0
- package/deps/librdkafka/packaging/nuget/templates/librdkafka.redist.nuspec +21 -0
- package/deps/librdkafka/packaging/nuget/templates/librdkafka.redist.props +18 -0
- package/deps/librdkafka/packaging/nuget/templates/librdkafka.redist.targets +19 -0
- package/deps/librdkafka/packaging/nuget/zfile/__init__.py +0 -0
- package/deps/librdkafka/packaging/nuget/zfile/zfile.py +98 -0
- package/deps/librdkafka/packaging/rpm/Makefile +92 -0
- package/deps/librdkafka/packaging/rpm/README.md +23 -0
- package/deps/librdkafka/packaging/rpm/el7-x86_64.cfg +40 -0
- package/deps/librdkafka/packaging/rpm/librdkafka.spec +118 -0
- package/deps/librdkafka/packaging/rpm/mock-on-docker.sh +96 -0
- package/deps/librdkafka/packaging/rpm/tests/Makefile +25 -0
- package/deps/librdkafka/packaging/rpm/tests/README.md +8 -0
- package/deps/librdkafka/packaging/rpm/tests/run-test.sh +42 -0
- package/deps/librdkafka/packaging/rpm/tests/test-on-docker.sh +56 -0
- package/deps/librdkafka/packaging/rpm/tests/test.c +77 -0
- package/deps/librdkafka/packaging/rpm/tests/test.cpp +34 -0
- package/deps/librdkafka/packaging/tools/Dockerfile +31 -0
- package/deps/librdkafka/packaging/tools/build-configurations-checks.sh +12 -0
- package/deps/librdkafka/packaging/tools/build-deb-package.sh +64 -0
- package/deps/librdkafka/packaging/tools/build-debian.sh +65 -0
- package/deps/librdkafka/packaging/tools/build-manylinux.sh +68 -0
- package/deps/librdkafka/packaging/tools/build-release-artifacts.sh +139 -0
- package/deps/librdkafka/packaging/tools/distro-build.sh +38 -0
- package/deps/librdkafka/packaging/tools/gh-release-checksums.py +39 -0
- package/deps/librdkafka/packaging/tools/rdutcoverage.sh +25 -0
- package/deps/librdkafka/packaging/tools/requirements.txt +2 -0
- package/deps/librdkafka/packaging/tools/run-in-docker.sh +28 -0
- package/deps/librdkafka/packaging/tools/run-integration-tests.sh +31 -0
- package/deps/librdkafka/packaging/tools/run-style-check.sh +4 -0
- package/deps/librdkafka/packaging/tools/style-format.sh +149 -0
- package/deps/librdkafka/packaging/tools/update_rpcs_max_versions.py +100 -0
- package/deps/librdkafka/service.yml +172 -0
- package/deps/librdkafka/src/CMakeLists.txt +374 -0
- package/deps/librdkafka/src/Makefile +103 -0
- package/deps/librdkafka/src/README.lz4.md +30 -0
- package/deps/librdkafka/src/cJSON.c +2834 -0
- package/deps/librdkafka/src/cJSON.h +398 -0
- package/deps/librdkafka/src/crc32c.c +430 -0
- package/deps/librdkafka/src/crc32c.h +38 -0
- package/deps/librdkafka/src/generate_proto.sh +66 -0
- package/deps/librdkafka/src/librdkafka_cgrp_synch.png +0 -0
- package/deps/librdkafka/src/lz4.c +2727 -0
- package/deps/librdkafka/src/lz4.h +842 -0
- package/deps/librdkafka/src/lz4frame.c +2078 -0
- package/deps/librdkafka/src/lz4frame.h +692 -0
- package/deps/librdkafka/src/lz4frame_static.h +47 -0
- package/deps/librdkafka/src/lz4hc.c +1631 -0
- package/deps/librdkafka/src/lz4hc.h +413 -0
- package/deps/librdkafka/src/nanopb/pb.h +917 -0
- package/deps/librdkafka/src/nanopb/pb_common.c +388 -0
- package/deps/librdkafka/src/nanopb/pb_common.h +49 -0
- package/deps/librdkafka/src/nanopb/pb_decode.c +1727 -0
- package/deps/librdkafka/src/nanopb/pb_decode.h +193 -0
- package/deps/librdkafka/src/nanopb/pb_encode.c +1000 -0
- package/deps/librdkafka/src/nanopb/pb_encode.h +185 -0
- package/deps/librdkafka/src/opentelemetry/common.pb.c +32 -0
- package/deps/librdkafka/src/opentelemetry/common.pb.h +170 -0
- package/deps/librdkafka/src/opentelemetry/metrics.options +2 -0
- package/deps/librdkafka/src/opentelemetry/metrics.pb.c +67 -0
- package/deps/librdkafka/src/opentelemetry/metrics.pb.h +966 -0
- package/deps/librdkafka/src/opentelemetry/resource.pb.c +12 -0
- package/deps/librdkafka/src/opentelemetry/resource.pb.h +58 -0
- package/deps/librdkafka/src/queue.h +850 -0
- package/deps/librdkafka/src/rd.h +584 -0
- package/deps/librdkafka/src/rdaddr.c +255 -0
- package/deps/librdkafka/src/rdaddr.h +202 -0
- package/deps/librdkafka/src/rdatomic.h +230 -0
- package/deps/librdkafka/src/rdavg.h +260 -0
- package/deps/librdkafka/src/rdavl.c +210 -0
- package/deps/librdkafka/src/rdavl.h +250 -0
- package/deps/librdkafka/src/rdbase64.c +200 -0
- package/deps/librdkafka/src/rdbase64.h +43 -0
- package/deps/librdkafka/src/rdbuf.c +1884 -0
- package/deps/librdkafka/src/rdbuf.h +375 -0
- package/deps/librdkafka/src/rdcrc32.c +114 -0
- package/deps/librdkafka/src/rdcrc32.h +170 -0
- package/deps/librdkafka/src/rddl.c +179 -0
- package/deps/librdkafka/src/rddl.h +43 -0
- package/deps/librdkafka/src/rdendian.h +175 -0
- package/deps/librdkafka/src/rdfloat.h +67 -0
- package/deps/librdkafka/src/rdfnv1a.c +113 -0
- package/deps/librdkafka/src/rdfnv1a.h +35 -0
- package/deps/librdkafka/src/rdgz.c +120 -0
- package/deps/librdkafka/src/rdgz.h +46 -0
- package/deps/librdkafka/src/rdhdrhistogram.c +721 -0
- package/deps/librdkafka/src/rdhdrhistogram.h +87 -0
- package/deps/librdkafka/src/rdhttp.c +830 -0
- package/deps/librdkafka/src/rdhttp.h +101 -0
- package/deps/librdkafka/src/rdinterval.h +177 -0
- package/deps/librdkafka/src/rdkafka.c +5505 -0
- package/deps/librdkafka/src/rdkafka.h +10686 -0
- package/deps/librdkafka/src/rdkafka_admin.c +9794 -0
- package/deps/librdkafka/src/rdkafka_admin.h +661 -0
- package/deps/librdkafka/src/rdkafka_assignment.c +1010 -0
- package/deps/librdkafka/src/rdkafka_assignment.h +73 -0
- package/deps/librdkafka/src/rdkafka_assignor.c +1786 -0
- package/deps/librdkafka/src/rdkafka_assignor.h +402 -0
- package/deps/librdkafka/src/rdkafka_aux.c +409 -0
- package/deps/librdkafka/src/rdkafka_aux.h +174 -0
- package/deps/librdkafka/src/rdkafka_background.c +221 -0
- package/deps/librdkafka/src/rdkafka_broker.c +6337 -0
- package/deps/librdkafka/src/rdkafka_broker.h +744 -0
- package/deps/librdkafka/src/rdkafka_buf.c +543 -0
- package/deps/librdkafka/src/rdkafka_buf.h +1525 -0
- package/deps/librdkafka/src/rdkafka_cert.c +576 -0
- package/deps/librdkafka/src/rdkafka_cert.h +62 -0
- package/deps/librdkafka/src/rdkafka_cgrp.c +7587 -0
- package/deps/librdkafka/src/rdkafka_cgrp.h +477 -0
- package/deps/librdkafka/src/rdkafka_conf.c +4880 -0
- package/deps/librdkafka/src/rdkafka_conf.h +732 -0
- package/deps/librdkafka/src/rdkafka_confval.h +97 -0
- package/deps/librdkafka/src/rdkafka_coord.c +623 -0
- package/deps/librdkafka/src/rdkafka_coord.h +132 -0
- package/deps/librdkafka/src/rdkafka_error.c +228 -0
- package/deps/librdkafka/src/rdkafka_error.h +80 -0
- package/deps/librdkafka/src/rdkafka_event.c +502 -0
- package/deps/librdkafka/src/rdkafka_event.h +126 -0
- package/deps/librdkafka/src/rdkafka_feature.c +898 -0
- package/deps/librdkafka/src/rdkafka_feature.h +104 -0
- package/deps/librdkafka/src/rdkafka_fetcher.c +1422 -0
- package/deps/librdkafka/src/rdkafka_fetcher.h +44 -0
- package/deps/librdkafka/src/rdkafka_header.c +220 -0
- package/deps/librdkafka/src/rdkafka_header.h +76 -0
- package/deps/librdkafka/src/rdkafka_idempotence.c +807 -0
- package/deps/librdkafka/src/rdkafka_idempotence.h +144 -0
- package/deps/librdkafka/src/rdkafka_int.h +1260 -0
- package/deps/librdkafka/src/rdkafka_interceptor.c +819 -0
- package/deps/librdkafka/src/rdkafka_interceptor.h +104 -0
- package/deps/librdkafka/src/rdkafka_lz4.c +450 -0
- package/deps/librdkafka/src/rdkafka_lz4.h +49 -0
- package/deps/librdkafka/src/rdkafka_metadata.c +2209 -0
- package/deps/librdkafka/src/rdkafka_metadata.h +345 -0
- package/deps/librdkafka/src/rdkafka_metadata_cache.c +1183 -0
- package/deps/librdkafka/src/rdkafka_mock.c +3661 -0
- package/deps/librdkafka/src/rdkafka_mock.h +610 -0
- package/deps/librdkafka/src/rdkafka_mock_cgrp.c +1876 -0
- package/deps/librdkafka/src/rdkafka_mock_handlers.c +3113 -0
- package/deps/librdkafka/src/rdkafka_mock_int.h +710 -0
- package/deps/librdkafka/src/rdkafka_msg.c +2589 -0
- package/deps/librdkafka/src/rdkafka_msg.h +614 -0
- package/deps/librdkafka/src/rdkafka_msgbatch.h +62 -0
- package/deps/librdkafka/src/rdkafka_msgset.h +98 -0
- package/deps/librdkafka/src/rdkafka_msgset_reader.c +1806 -0
- package/deps/librdkafka/src/rdkafka_msgset_writer.c +1474 -0
- package/deps/librdkafka/src/rdkafka_offset.c +1565 -0
- package/deps/librdkafka/src/rdkafka_offset.h +150 -0
- package/deps/librdkafka/src/rdkafka_op.c +997 -0
- package/deps/librdkafka/src/rdkafka_op.h +858 -0
- package/deps/librdkafka/src/rdkafka_partition.c +4896 -0
- package/deps/librdkafka/src/rdkafka_partition.h +1182 -0
- package/deps/librdkafka/src/rdkafka_pattern.c +228 -0
- package/deps/librdkafka/src/rdkafka_pattern.h +70 -0
- package/deps/librdkafka/src/rdkafka_plugin.c +213 -0
- package/deps/librdkafka/src/rdkafka_plugin.h +41 -0
- package/deps/librdkafka/src/rdkafka_proto.h +736 -0
- package/deps/librdkafka/src/rdkafka_protocol.h +128 -0
- package/deps/librdkafka/src/rdkafka_queue.c +1230 -0
- package/deps/librdkafka/src/rdkafka_queue.h +1220 -0
- package/deps/librdkafka/src/rdkafka_range_assignor.c +1748 -0
- package/deps/librdkafka/src/rdkafka_request.c +7089 -0
- package/deps/librdkafka/src/rdkafka_request.h +732 -0
- package/deps/librdkafka/src/rdkafka_roundrobin_assignor.c +123 -0
- package/deps/librdkafka/src/rdkafka_sasl.c +530 -0
- package/deps/librdkafka/src/rdkafka_sasl.h +63 -0
- package/deps/librdkafka/src/rdkafka_sasl_cyrus.c +722 -0
- package/deps/librdkafka/src/rdkafka_sasl_int.h +89 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.c +1833 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer.h +52 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.c +1666 -0
- package/deps/librdkafka/src/rdkafka_sasl_oauthbearer_oidc.h +47 -0
- package/deps/librdkafka/src/rdkafka_sasl_plain.c +142 -0
- package/deps/librdkafka/src/rdkafka_sasl_scram.c +858 -0
- package/deps/librdkafka/src/rdkafka_sasl_win32.c +550 -0
- package/deps/librdkafka/src/rdkafka_ssl.c +2129 -0
- package/deps/librdkafka/src/rdkafka_ssl.h +86 -0
- package/deps/librdkafka/src/rdkafka_sticky_assignor.c +4785 -0
- package/deps/librdkafka/src/rdkafka_subscription.c +278 -0
- package/deps/librdkafka/src/rdkafka_telemetry.c +760 -0
- package/deps/librdkafka/src/rdkafka_telemetry.h +52 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.c +1053 -0
- package/deps/librdkafka/src/rdkafka_telemetry_decode.h +59 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.c +997 -0
- package/deps/librdkafka/src/rdkafka_telemetry_encode.h +301 -0
- package/deps/librdkafka/src/rdkafka_timer.c +402 -0
- package/deps/librdkafka/src/rdkafka_timer.h +117 -0
- package/deps/librdkafka/src/rdkafka_topic.c +2161 -0
- package/deps/librdkafka/src/rdkafka_topic.h +334 -0
- package/deps/librdkafka/src/rdkafka_transport.c +1309 -0
- package/deps/librdkafka/src/rdkafka_transport.h +99 -0
- package/deps/librdkafka/src/rdkafka_transport_int.h +100 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.c +3256 -0
- package/deps/librdkafka/src/rdkafka_txnmgr.h +171 -0
- package/deps/librdkafka/src/rdkafka_zstd.c +226 -0
- package/deps/librdkafka/src/rdkafka_zstd.h +57 -0
- package/deps/librdkafka/src/rdlist.c +576 -0
- package/deps/librdkafka/src/rdlist.h +434 -0
- package/deps/librdkafka/src/rdlog.c +89 -0
- package/deps/librdkafka/src/rdlog.h +41 -0
- package/deps/librdkafka/src/rdmap.c +508 -0
- package/deps/librdkafka/src/rdmap.h +492 -0
- package/deps/librdkafka/src/rdmurmur2.c +167 -0
- package/deps/librdkafka/src/rdmurmur2.h +35 -0
- package/deps/librdkafka/src/rdports.c +61 -0
- package/deps/librdkafka/src/rdports.h +38 -0
- package/deps/librdkafka/src/rdposix.h +250 -0
- package/deps/librdkafka/src/rdrand.c +80 -0
- package/deps/librdkafka/src/rdrand.h +43 -0
- package/deps/librdkafka/src/rdregex.c +156 -0
- package/deps/librdkafka/src/rdregex.h +43 -0
- package/deps/librdkafka/src/rdsignal.h +57 -0
- package/deps/librdkafka/src/rdstring.c +645 -0
- package/deps/librdkafka/src/rdstring.h +98 -0
- package/deps/librdkafka/src/rdsysqueue.h +404 -0
- package/deps/librdkafka/src/rdtime.h +356 -0
- package/deps/librdkafka/src/rdtypes.h +86 -0
- package/deps/librdkafka/src/rdunittest.c +549 -0
- package/deps/librdkafka/src/rdunittest.h +232 -0
- package/deps/librdkafka/src/rdvarint.c +134 -0
- package/deps/librdkafka/src/rdvarint.h +165 -0
- package/deps/librdkafka/src/rdwin32.h +382 -0
- package/deps/librdkafka/src/rdxxhash.c +1030 -0
- package/deps/librdkafka/src/rdxxhash.h +328 -0
- package/deps/librdkafka/src/regexp.c +1352 -0
- package/deps/librdkafka/src/regexp.h +41 -0
- package/deps/librdkafka/src/snappy.c +1866 -0
- package/deps/librdkafka/src/snappy.h +62 -0
- package/deps/librdkafka/src/snappy_compat.h +138 -0
- package/deps/librdkafka/src/statistics_schema.json +444 -0
- package/deps/librdkafka/src/tinycthread.c +932 -0
- package/deps/librdkafka/src/tinycthread.h +503 -0
- package/deps/librdkafka/src/tinycthread_extra.c +199 -0
- package/deps/librdkafka/src/tinycthread_extra.h +212 -0
- package/deps/librdkafka/src/win32_config.h +58 -0
- package/deps/librdkafka/src-cpp/CMakeLists.txt +90 -0
- package/deps/librdkafka/src-cpp/ConfImpl.cpp +84 -0
- package/deps/librdkafka/src-cpp/ConsumerImpl.cpp +244 -0
- package/deps/librdkafka/src-cpp/HandleImpl.cpp +436 -0
- package/deps/librdkafka/src-cpp/HeadersImpl.cpp +48 -0
- package/deps/librdkafka/src-cpp/KafkaConsumerImpl.cpp +296 -0
- package/deps/librdkafka/src-cpp/Makefile +55 -0
- package/deps/librdkafka/src-cpp/MessageImpl.cpp +38 -0
- package/deps/librdkafka/src-cpp/MetadataImpl.cpp +170 -0
- package/deps/librdkafka/src-cpp/ProducerImpl.cpp +197 -0
- package/deps/librdkafka/src-cpp/QueueImpl.cpp +70 -0
- package/deps/librdkafka/src-cpp/README.md +16 -0
- package/deps/librdkafka/src-cpp/RdKafka.cpp +59 -0
- package/deps/librdkafka/src-cpp/TopicImpl.cpp +124 -0
- package/deps/librdkafka/src-cpp/TopicPartitionImpl.cpp +57 -0
- package/deps/librdkafka/src-cpp/rdkafkacpp.h +3797 -0
- package/deps/librdkafka/src-cpp/rdkafkacpp_int.h +1641 -0
- package/deps/librdkafka/tests/0000-unittests.c +72 -0
- package/deps/librdkafka/tests/0001-multiobj.c +102 -0
- package/deps/librdkafka/tests/0002-unkpart.c +244 -0
- package/deps/librdkafka/tests/0003-msgmaxsize.c +173 -0
- package/deps/librdkafka/tests/0004-conf.c +934 -0
- package/deps/librdkafka/tests/0005-order.c +133 -0
- package/deps/librdkafka/tests/0006-symbols.c +163 -0
- package/deps/librdkafka/tests/0007-autotopic.c +136 -0
- package/deps/librdkafka/tests/0008-reqacks.c +179 -0
- package/deps/librdkafka/tests/0009-mock_cluster.c +97 -0
- package/deps/librdkafka/tests/0011-produce_batch.c +753 -0
- package/deps/librdkafka/tests/0012-produce_consume.c +537 -0
- package/deps/librdkafka/tests/0013-null-msgs.c +473 -0
- package/deps/librdkafka/tests/0014-reconsume-191.c +512 -0
- package/deps/librdkafka/tests/0015-offset_seeks.c +172 -0
- package/deps/librdkafka/tests/0016-client_swname.c +181 -0
- package/deps/librdkafka/tests/0017-compression.c +140 -0
- package/deps/librdkafka/tests/0018-cgrp_term.c +338 -0
- package/deps/librdkafka/tests/0019-list_groups.c +289 -0
- package/deps/librdkafka/tests/0020-destroy_hang.c +162 -0
- package/deps/librdkafka/tests/0021-rkt_destroy.c +72 -0
- package/deps/librdkafka/tests/0022-consume_batch.c +279 -0
- package/deps/librdkafka/tests/0025-timers.c +147 -0
- package/deps/librdkafka/tests/0026-consume_pause.c +547 -0
- package/deps/librdkafka/tests/0028-long_topicnames.c +79 -0
- package/deps/librdkafka/tests/0029-assign_offset.c +202 -0
- package/deps/librdkafka/tests/0030-offset_commit.c +589 -0
- package/deps/librdkafka/tests/0031-get_offsets.c +235 -0
- package/deps/librdkafka/tests/0033-regex_subscribe.c +536 -0
- package/deps/librdkafka/tests/0034-offset_reset.c +398 -0
- package/deps/librdkafka/tests/0035-api_version.c +73 -0
- package/deps/librdkafka/tests/0036-partial_fetch.c +87 -0
- package/deps/librdkafka/tests/0037-destroy_hang_local.c +85 -0
- package/deps/librdkafka/tests/0038-performance.c +121 -0
- package/deps/librdkafka/tests/0039-event.c +284 -0
- package/deps/librdkafka/tests/0040-io_event.c +257 -0
- package/deps/librdkafka/tests/0041-fetch_max_bytes.c +97 -0
- package/deps/librdkafka/tests/0042-many_topics.c +252 -0
- package/deps/librdkafka/tests/0043-no_connection.c +77 -0
- package/deps/librdkafka/tests/0044-partition_cnt.c +94 -0
- package/deps/librdkafka/tests/0045-subscribe_update.c +1010 -0
- package/deps/librdkafka/tests/0046-rkt_cache.c +65 -0
- package/deps/librdkafka/tests/0047-partial_buf_tmout.c +98 -0
- package/deps/librdkafka/tests/0048-partitioner.c +283 -0
- package/deps/librdkafka/tests/0049-consume_conn_close.c +162 -0
- package/deps/librdkafka/tests/0050-subscribe_adds.c +145 -0
- package/deps/librdkafka/tests/0051-assign_adds.c +126 -0
- package/deps/librdkafka/tests/0052-msg_timestamps.c +238 -0
- package/deps/librdkafka/tests/0053-stats_cb.cpp +527 -0
- package/deps/librdkafka/tests/0054-offset_time.cpp +236 -0
- package/deps/librdkafka/tests/0055-producer_latency.c +539 -0
- package/deps/librdkafka/tests/0056-balanced_group_mt.c +315 -0
- package/deps/librdkafka/tests/0057-invalid_topic.cpp +112 -0
- package/deps/librdkafka/tests/0058-log.cpp +123 -0
- package/deps/librdkafka/tests/0059-bsearch.cpp +241 -0
- package/deps/librdkafka/tests/0060-op_prio.cpp +163 -0
- package/deps/librdkafka/tests/0061-consumer_lag.cpp +295 -0
- package/deps/librdkafka/tests/0062-stats_event.c +126 -0
- package/deps/librdkafka/tests/0063-clusterid.cpp +180 -0
- package/deps/librdkafka/tests/0064-interceptors.c +481 -0
- package/deps/librdkafka/tests/0065-yield.cpp +140 -0
- package/deps/librdkafka/tests/0066-plugins.cpp +129 -0
- package/deps/librdkafka/tests/0067-empty_topic.cpp +151 -0
- package/deps/librdkafka/tests/0068-produce_timeout.c +136 -0
- package/deps/librdkafka/tests/0069-consumer_add_parts.c +119 -0
- package/deps/librdkafka/tests/0070-null_empty.cpp +197 -0
- package/deps/librdkafka/tests/0072-headers_ut.c +448 -0
- package/deps/librdkafka/tests/0073-headers.c +381 -0
- package/deps/librdkafka/tests/0074-producev.c +87 -0
- package/deps/librdkafka/tests/0075-retry.c +290 -0
- package/deps/librdkafka/tests/0076-produce_retry.c +452 -0
- package/deps/librdkafka/tests/0077-compaction.c +363 -0
- package/deps/librdkafka/tests/0078-c_from_cpp.cpp +96 -0
- package/deps/librdkafka/tests/0079-fork.c +93 -0
- package/deps/librdkafka/tests/0080-admin_ut.c +3095 -0
- package/deps/librdkafka/tests/0081-admin.c +5633 -0
- package/deps/librdkafka/tests/0082-fetch_max_bytes.cpp +137 -0
- package/deps/librdkafka/tests/0083-cb_event.c +233 -0
- package/deps/librdkafka/tests/0084-destroy_flags.c +208 -0
- package/deps/librdkafka/tests/0085-headers.cpp +392 -0
- package/deps/librdkafka/tests/0086-purge.c +368 -0
- package/deps/librdkafka/tests/0088-produce_metadata_timeout.c +162 -0
- package/deps/librdkafka/tests/0089-max_poll_interval.c +511 -0
- package/deps/librdkafka/tests/0090-idempotence.c +171 -0
- package/deps/librdkafka/tests/0091-max_poll_interval_timeout.c +295 -0
- package/deps/librdkafka/tests/0092-mixed_msgver.c +103 -0
- package/deps/librdkafka/tests/0093-holb.c +200 -0
- package/deps/librdkafka/tests/0094-idempotence_msg_timeout.c +231 -0
- package/deps/librdkafka/tests/0095-all_brokers_down.cpp +122 -0
- package/deps/librdkafka/tests/0097-ssl_verify.cpp +658 -0
- package/deps/librdkafka/tests/0098-consumer-txn.cpp +1218 -0
- package/deps/librdkafka/tests/0099-commit_metadata.c +194 -0
- package/deps/librdkafka/tests/0100-thread_interceptors.cpp +195 -0
- package/deps/librdkafka/tests/0101-fetch-from-follower.cpp +446 -0
- package/deps/librdkafka/tests/0102-static_group_rebalance.c +836 -0
- package/deps/librdkafka/tests/0103-transactions.c +1383 -0
- package/deps/librdkafka/tests/0104-fetch_from_follower_mock.c +625 -0
- package/deps/librdkafka/tests/0105-transactions_mock.c +3930 -0
- package/deps/librdkafka/tests/0106-cgrp_sess_timeout.c +318 -0
- package/deps/librdkafka/tests/0107-topic_recreate.c +259 -0
- package/deps/librdkafka/tests/0109-auto_create_topics.cpp +278 -0
- package/deps/librdkafka/tests/0110-batch_size.cpp +182 -0
- package/deps/librdkafka/tests/0111-delay_create_topics.cpp +127 -0
- package/deps/librdkafka/tests/0112-assign_unknown_part.c +87 -0
- package/deps/librdkafka/tests/0113-cooperative_rebalance.cpp +3473 -0
- package/deps/librdkafka/tests/0114-sticky_partitioning.cpp +176 -0
- package/deps/librdkafka/tests/0115-producer_auth.cpp +182 -0
- package/deps/librdkafka/tests/0116-kafkaconsumer_close.cpp +216 -0
- package/deps/librdkafka/tests/0117-mock_errors.c +331 -0
- package/deps/librdkafka/tests/0118-commit_rebalance.c +154 -0
- package/deps/librdkafka/tests/0119-consumer_auth.cpp +167 -0
- package/deps/librdkafka/tests/0120-asymmetric_subscription.c +185 -0
- package/deps/librdkafka/tests/0121-clusterid.c +115 -0
- package/deps/librdkafka/tests/0122-buffer_cleaning_after_rebalance.c +227 -0
- package/deps/librdkafka/tests/0123-connections_max_idle.c +98 -0
- package/deps/librdkafka/tests/0124-openssl_invalid_engine.c +69 -0
- package/deps/librdkafka/tests/0125-immediate_flush.c +144 -0
- package/deps/librdkafka/tests/0126-oauthbearer_oidc.c +528 -0
- package/deps/librdkafka/tests/0127-fetch_queue_backoff.cpp +165 -0
- package/deps/librdkafka/tests/0128-sasl_callback_queue.cpp +125 -0
- package/deps/librdkafka/tests/0129-fetch_aborted_msgs.c +79 -0
- package/deps/librdkafka/tests/0130-store_offsets.c +178 -0
- package/deps/librdkafka/tests/0131-connect_timeout.c +81 -0
- package/deps/librdkafka/tests/0132-strategy_ordering.c +179 -0
- package/deps/librdkafka/tests/0133-ssl_keys.c +150 -0
- package/deps/librdkafka/tests/0134-ssl_provider.c +92 -0
- package/deps/librdkafka/tests/0135-sasl_credentials.cpp +143 -0
- package/deps/librdkafka/tests/0136-resolve_cb.c +181 -0
- package/deps/librdkafka/tests/0137-barrier_batch_consume.c +619 -0
- package/deps/librdkafka/tests/0138-admin_mock.c +281 -0
- package/deps/librdkafka/tests/0139-offset_validation_mock.c +950 -0
- package/deps/librdkafka/tests/0140-commit_metadata.cpp +108 -0
- package/deps/librdkafka/tests/0142-reauthentication.c +515 -0
- package/deps/librdkafka/tests/0143-exponential_backoff_mock.c +552 -0
- package/deps/librdkafka/tests/0144-idempotence_mock.c +373 -0
- package/deps/librdkafka/tests/0145-pause_resume_mock.c +119 -0
- package/deps/librdkafka/tests/0146-metadata_mock.c +505 -0
- package/deps/librdkafka/tests/0147-consumer_group_consumer_mock.c +952 -0
- package/deps/librdkafka/tests/0148-offset_fetch_commit_error_mock.c +563 -0
- package/deps/librdkafka/tests/0149-broker-same-host-port.c +140 -0
- package/deps/librdkafka/tests/0150-telemetry_mock.c +651 -0
- package/deps/librdkafka/tests/0151-purge-brokers.c +566 -0
- package/deps/librdkafka/tests/0152-rebootstrap.c +59 -0
- package/deps/librdkafka/tests/0153-memberid.c +128 -0
- package/deps/librdkafka/tests/1000-unktopic.c +164 -0
- package/deps/librdkafka/tests/8000-idle.cpp +60 -0
- package/deps/librdkafka/tests/8001-fetch_from_follower_mock_manual.c +113 -0
- package/deps/librdkafka/tests/CMakeLists.txt +170 -0
- package/deps/librdkafka/tests/LibrdkafkaTestApp.py +291 -0
- package/deps/librdkafka/tests/Makefile +182 -0
- package/deps/librdkafka/tests/README.md +509 -0
- package/deps/librdkafka/tests/autotest.sh +33 -0
- package/deps/librdkafka/tests/backtrace.gdb +30 -0
- package/deps/librdkafka/tests/broker_version_tests.py +315 -0
- package/deps/librdkafka/tests/buildbox.sh +17 -0
- package/deps/librdkafka/tests/cleanup-checker-tests.sh +20 -0
- package/deps/librdkafka/tests/cluster_testing.py +191 -0
- package/deps/librdkafka/tests/delete-test-topics.sh +56 -0
- package/deps/librdkafka/tests/fixtures/oauthbearer/jwt_assertion_template.json +10 -0
- package/deps/librdkafka/tests/fixtures/ssl/Makefile +8 -0
- package/deps/librdkafka/tests/fixtures/ssl/README.md +13 -0
- package/deps/librdkafka/tests/fixtures/ssl/client.keystore.intermediate.p12 +0 -0
- package/deps/librdkafka/tests/fixtures/ssl/client.keystore.p12 +0 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.intermediate.pem +72 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.certificate.pem +50 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.intermediate.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/client2.key +46 -0
- package/deps/librdkafka/tests/fixtures/ssl/create_keys.sh +168 -0
- package/deps/librdkafka/tests/fuzzers/Makefile +12 -0
- package/deps/librdkafka/tests/fuzzers/README.md +31 -0
- package/deps/librdkafka/tests/fuzzers/fuzz_regex.c +74 -0
- package/deps/librdkafka/tests/fuzzers/helpers.h +90 -0
- package/deps/librdkafka/tests/gen-ssl-certs.sh +165 -0
- package/deps/librdkafka/tests/interactive_broker_version.py +170 -0
- package/deps/librdkafka/tests/interceptor_test/CMakeLists.txt +16 -0
- package/deps/librdkafka/tests/interceptor_test/Makefile +22 -0
- package/deps/librdkafka/tests/interceptor_test/interceptor_test.c +314 -0
- package/deps/librdkafka/tests/interceptor_test/interceptor_test.h +54 -0
- package/deps/librdkafka/tests/java/IncrementalRebalanceCli.java +97 -0
- package/deps/librdkafka/tests/java/Makefile +13 -0
- package/deps/librdkafka/tests/java/Murmur2Cli.java +46 -0
- package/deps/librdkafka/tests/java/README.md +14 -0
- package/deps/librdkafka/tests/java/TransactionProducerCli.java +162 -0
- package/deps/librdkafka/tests/java/run-class.sh +11 -0
- package/deps/librdkafka/tests/librdkafka.suppressions +483 -0
- package/deps/librdkafka/tests/lz4_manual_test.sh +59 -0
- package/deps/librdkafka/tests/multi-broker-version-test.sh +50 -0
- package/deps/librdkafka/tests/parse-refcnt.sh +43 -0
- package/deps/librdkafka/tests/performance_plot.py +115 -0
- package/deps/librdkafka/tests/plugin_test/Makefile +19 -0
- package/deps/librdkafka/tests/plugin_test/plugin_test.c +58 -0
- package/deps/librdkafka/tests/requirements.txt +2 -0
- package/deps/librdkafka/tests/run-all-tests.sh +79 -0
- package/deps/librdkafka/tests/run-consumer-tests.sh +16 -0
- package/deps/librdkafka/tests/run-producer-tests.sh +16 -0
- package/deps/librdkafka/tests/run-test-batches.py +157 -0
- package/deps/librdkafka/tests/run-test.sh +140 -0
- package/deps/librdkafka/tests/rusage.c +249 -0
- package/deps/librdkafka/tests/sasl_test.py +289 -0
- package/deps/librdkafka/tests/scenarios/README.md +6 -0
- package/deps/librdkafka/tests/scenarios/ak23.json +6 -0
- package/deps/librdkafka/tests/scenarios/default.json +5 -0
- package/deps/librdkafka/tests/scenarios/noautocreate.json +5 -0
- package/deps/librdkafka/tests/sockem.c +801 -0
- package/deps/librdkafka/tests/sockem.h +85 -0
- package/deps/librdkafka/tests/sockem_ctrl.c +145 -0
- package/deps/librdkafka/tests/sockem_ctrl.h +61 -0
- package/deps/librdkafka/tests/test.c +7778 -0
- package/deps/librdkafka/tests/test.conf.example +27 -0
- package/deps/librdkafka/tests/test.h +1028 -0
- package/deps/librdkafka/tests/testcpp.cpp +131 -0
- package/deps/librdkafka/tests/testcpp.h +388 -0
- package/deps/librdkafka/tests/testshared.h +416 -0
- package/deps/librdkafka/tests/tools/README.md +4 -0
- package/deps/librdkafka/tests/tools/stats/README.md +21 -0
- package/deps/librdkafka/tests/tools/stats/filter.jq +42 -0
- package/deps/librdkafka/tests/tools/stats/graph.py +150 -0
- package/deps/librdkafka/tests/tools/stats/requirements.txt +3 -0
- package/deps/librdkafka/tests/tools/stats/to_csv.py +124 -0
- package/deps/librdkafka/tests/trivup/trivup-0.14.0.tar.gz +0 -0
- package/deps/librdkafka/tests/until-fail.sh +87 -0
- package/deps/librdkafka/tests/xxxx-assign_partition.c +122 -0
- package/deps/librdkafka/tests/xxxx-metadata.cpp +159 -0
- package/deps/librdkafka/vcpkg.json +23 -0
- package/deps/librdkafka/win32/README.md +5 -0
- package/deps/librdkafka/win32/build-package.bat +3 -0
- package/deps/librdkafka/win32/build.bat +19 -0
- package/deps/librdkafka/win32/common.vcxproj +84 -0
- package/deps/librdkafka/win32/interceptor_test/interceptor_test.vcxproj +87 -0
- package/deps/librdkafka/win32/librdkafka.autopkg.template +54 -0
- package/deps/librdkafka/win32/librdkafka.master.testing.targets +13 -0
- package/deps/librdkafka/win32/librdkafka.sln +226 -0
- package/deps/librdkafka/win32/librdkafka.vcxproj +276 -0
- package/deps/librdkafka/win32/librdkafkacpp/librdkafkacpp.vcxproj +104 -0
- package/deps/librdkafka/win32/msbuild.ps1 +15 -0
- package/deps/librdkafka/win32/openssl_engine_example/openssl_engine_example.vcxproj +132 -0
- package/deps/librdkafka/win32/package-zip.ps1 +46 -0
- package/deps/librdkafka/win32/packages/repositories.config +4 -0
- package/deps/librdkafka/win32/push-package.bat +4 -0
- package/deps/librdkafka/win32/rdkafka_complex_consumer_example_cpp/rdkafka_complex_consumer_example_cpp.vcxproj +67 -0
- package/deps/librdkafka/win32/rdkafka_example/rdkafka_example.vcxproj +97 -0
- package/deps/librdkafka/win32/rdkafka_performance/rdkafka_performance.vcxproj +97 -0
- package/deps/librdkafka/win32/setup-msys2.ps1 +47 -0
- package/deps/librdkafka/win32/setup-vcpkg.ps1 +34 -0
- package/deps/librdkafka/win32/tests/test.conf.example +25 -0
- package/deps/librdkafka/win32/tests/tests.vcxproj +253 -0
- package/deps/librdkafka/win32/win_ssl_cert_store/win_ssl_cert_store.vcxproj +132 -0
- package/deps/librdkafka/win32/wingetopt.c +564 -0
- package/deps/librdkafka/win32/wingetopt.h +101 -0
- package/deps/librdkafka/win32/wintime.h +33 -0
- package/deps/librdkafka.gyp +62 -0
- package/lib/admin.js +233 -0
- package/lib/client.js +573 -0
- package/lib/error.js +500 -0
- package/lib/index.js +34 -0
- package/lib/kafka-consumer-stream.js +397 -0
- package/lib/kafka-consumer.js +698 -0
- package/lib/producer/high-level-producer.js +323 -0
- package/lib/producer-stream.js +307 -0
- package/lib/producer.js +375 -0
- package/lib/tools/ref-counter.js +52 -0
- package/lib/topic-partition.js +88 -0
- package/lib/topic.js +42 -0
- package/lib/util.js +29 -0
- package/package.json +61 -0
- package/prebuilds/darwin-arm64/@point3+node-rdkafka.node +0 -0
- package/prebuilds/linux-x64/@point3+node-rdkafka.node +0 -0
- package/util/configure.js +30 -0
- package/util/get-env.js +6 -0
- package/util/test-compile.js +11 -0
- package/util/test-producer-delivery.js +100 -0
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
#
|
|
3
|
+
# Packaging script.
|
|
4
|
+
# Assembles packages using CI artifacts.
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import re
|
|
9
|
+
import os
|
|
10
|
+
import shutil
|
|
11
|
+
from fnmatch import fnmatch
|
|
12
|
+
from string import Template
|
|
13
|
+
from zfile import zfile
|
|
14
|
+
import boto3
|
|
15
|
+
import magic
|
|
16
|
+
|
|
17
|
+
if sys.version_info[0] < 3:
|
|
18
|
+
from urllib import unquote as _unquote
|
|
19
|
+
else:
|
|
20
|
+
from urllib.parse import unquote as _unquote
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def unquote(path):
|
|
24
|
+
# Removes URL escapes, and normalizes the path by removing ./.
|
|
25
|
+
path = _unquote(path)
|
|
26
|
+
if path[:2] == './':
|
|
27
|
+
return path[2:]
|
|
28
|
+
return path
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Rename token values
|
|
32
|
+
rename_vals = {'plat': {'windows': 'win'},
|
|
33
|
+
'arch': {'x86_64': 'x64',
|
|
34
|
+
'amd64': 'x64',
|
|
35
|
+
'i386': 'x86',
|
|
36
|
+
'win32': 'x86'}}
|
|
37
|
+
|
|
38
|
+
# Filemagic arch mapping.
|
|
39
|
+
# key is (plat, arch, file_extension), value is a compiled filemagic regex.
|
|
40
|
+
# This is used to verify that an artifact has the expected file type.
|
|
41
|
+
magic_patterns = {
|
|
42
|
+
('win', 'x64', '.dll'): re.compile('PE32.*DLL.* x86-64, for MS Windows'),
|
|
43
|
+
('win', 'x86', '.dll'):
|
|
44
|
+
re.compile('PE32.*DLL.* Intel 80386, for MS Windows'),
|
|
45
|
+
('win', 'x64', '.lib'): re.compile('current ar archive'),
|
|
46
|
+
('win', 'x86', '.lib'): re.compile('current ar archive'),
|
|
47
|
+
('linux', 'x64', '.so'): re.compile('ELF 64.* x86-64'),
|
|
48
|
+
('linux', 'arm64', '.so'): re.compile('ELF 64.* ARM aarch64'),
|
|
49
|
+
('osx', 'x64', '.dylib'): re.compile('Mach-O 64.* x86_64'),
|
|
50
|
+
('osx', 'arm64', '.dylib'): re.compile('Mach-O 64.*arm64')}
|
|
51
|
+
|
|
52
|
+
magic = magic.Magic()
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def magic_mismatch(path, a):
|
|
56
|
+
""" Verify that the filemagic for \\p path matches for artifact \\p a.
|
|
57
|
+
Returns True if the magic file info does NOT match.
|
|
58
|
+
Returns False if no matching is needed or the magic matches. """
|
|
59
|
+
k = (a.info.get('plat', None), a.info.get('arch', None),
|
|
60
|
+
os.path.splitext(path)[1])
|
|
61
|
+
pattern = magic_patterns.get(k, None)
|
|
62
|
+
if pattern is None:
|
|
63
|
+
return False
|
|
64
|
+
|
|
65
|
+
minfo = magic.id_filename(path)
|
|
66
|
+
if not pattern.match(minfo):
|
|
67
|
+
print(
|
|
68
|
+
f"Warning: {path} magic \"{minfo}\" "
|
|
69
|
+
f"does not match expected {pattern} for key {k}")
|
|
70
|
+
return True
|
|
71
|
+
|
|
72
|
+
return False
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# Collects CI artifacts from S3 storage, downloading them
|
|
76
|
+
# to a local directory, or collecting already downloaded artifacts from
|
|
77
|
+
# local directory.
|
|
78
|
+
#
|
|
79
|
+
# The artifacts' folder in the S3 bucket must have the following token
|
|
80
|
+
# format:
|
|
81
|
+
# <token>-[<value>]__ (repeat)
|
|
82
|
+
#
|
|
83
|
+
# Recognized tokens (unrecognized tokens are ignored):
|
|
84
|
+
# p - project (e.g., "confluent-kafka-python")
|
|
85
|
+
# bld - builder (e.g., "travis")
|
|
86
|
+
# plat - platform ("osx", "linux", ..)
|
|
87
|
+
# dist - distro or runtime ("centos8", "mingw", "msvcr", "alpine", ..).
|
|
88
|
+
# arch - arch ("x64", ..)
|
|
89
|
+
# tag - git tag
|
|
90
|
+
# sha - git sha
|
|
91
|
+
# bid - builder's build-id
|
|
92
|
+
# bldtype - Release, Debug (appveyor)
|
|
93
|
+
# lnk - Linkage ("std", "static", "all" (both std and static))
|
|
94
|
+
# extra - Extra build options, typically "gssapi" (for cyrus-sasl linking).
|
|
95
|
+
|
|
96
|
+
#
|
|
97
|
+
# Example:
|
|
98
|
+
# librdkafka/p-librdkafka__bld-travis__plat-linux__arch-x64__tag-v0.0.62__sha-d051b2c19eb0c118991cd8bc5cf86d8e5e446cde__bid-1562.1/librdkafka.tar.gz
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class MissingArtifactError(Exception):
|
|
102
|
+
pass
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
s3_bucket = 'librdkafka-ci-packages'
|
|
106
|
+
dry_run = False
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class Artifact (object):
|
|
110
|
+
def __init__(self, arts, path, info=None):
|
|
111
|
+
self.path = path
|
|
112
|
+
# Remove unexpanded AppVeyor $(..) tokens from filename
|
|
113
|
+
self.fname = re.sub(r'\$\([^\)]+\)', '', os.path.basename(path))
|
|
114
|
+
slpath = os.path.join(os.path.dirname(path), self.fname)
|
|
115
|
+
if os.path.isfile(slpath):
|
|
116
|
+
# Already points to local file in correct location
|
|
117
|
+
self.lpath = slpath
|
|
118
|
+
else:
|
|
119
|
+
# Prepare download location in dlpath
|
|
120
|
+
self.lpath = os.path.join(arts.dlpath, slpath)
|
|
121
|
+
|
|
122
|
+
if info is None:
|
|
123
|
+
self.info = dict()
|
|
124
|
+
else:
|
|
125
|
+
# Assign the map and convert all keys to lower case
|
|
126
|
+
self.info = {k.lower(): v for k, v in info.items()}
|
|
127
|
+
# Rename values, e.g., 'plat':'windows' to 'plat':'win'
|
|
128
|
+
for k, v in self.info.items():
|
|
129
|
+
rdict = rename_vals.get(k, None)
|
|
130
|
+
if rdict is not None:
|
|
131
|
+
self.info[k] = rdict.get(v, v)
|
|
132
|
+
|
|
133
|
+
# Score value for sorting
|
|
134
|
+
self.score = 0
|
|
135
|
+
|
|
136
|
+
# AppVeyor symbol builds are of less value
|
|
137
|
+
if self.fname.find('.symbols.') != -1:
|
|
138
|
+
self.score -= 10
|
|
139
|
+
|
|
140
|
+
self.arts = arts
|
|
141
|
+
arts.artifacts.append(self)
|
|
142
|
+
|
|
143
|
+
def __repr__(self):
|
|
144
|
+
return self.path
|
|
145
|
+
|
|
146
|
+
def __lt__(self, other):
|
|
147
|
+
return self.score < other.score
|
|
148
|
+
|
|
149
|
+
def download(self):
|
|
150
|
+
""" Download artifact from S3 and store in local directory .lpath.
|
|
151
|
+
If the artifact is already downloaded nothing is done. """
|
|
152
|
+
if os.path.isfile(self.lpath) and os.path.getsize(self.lpath) > 0:
|
|
153
|
+
return
|
|
154
|
+
print('Downloading %s' % self.path)
|
|
155
|
+
if dry_run:
|
|
156
|
+
return
|
|
157
|
+
ldir = os.path.dirname(self.lpath)
|
|
158
|
+
if not os.path.isdir(ldir):
|
|
159
|
+
os.makedirs(ldir, 0o755)
|
|
160
|
+
self.arts.s3_bucket.download_file(self.path, self.lpath)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class Artifacts (object):
|
|
164
|
+
def __init__(self, match, dlpath):
|
|
165
|
+
super(Artifacts, self).__init__()
|
|
166
|
+
self.match = match
|
|
167
|
+
self.artifacts = list()
|
|
168
|
+
# Download directory (make sure it ends with a path separator)
|
|
169
|
+
if not dlpath.endswith(os.path.sep):
|
|
170
|
+
dlpath = os.path.join(dlpath, '')
|
|
171
|
+
self.dlpath = dlpath
|
|
172
|
+
if not os.path.isdir(self.dlpath):
|
|
173
|
+
if not dry_run:
|
|
174
|
+
os.makedirs(self.dlpath, 0o755)
|
|
175
|
+
|
|
176
|
+
def collect_single(self, path, req_tag=True):
|
|
177
|
+
""" Collect single artifact, be it in S3 or locally.
|
|
178
|
+
:param: path string: S3 or local (relative) path
|
|
179
|
+
:param: req_tag bool: Require tag to match.
|
|
180
|
+
"""
|
|
181
|
+
|
|
182
|
+
# For local files, strip download path.
|
|
183
|
+
# Also ignore any parent directories.
|
|
184
|
+
if path.startswith(self.dlpath):
|
|
185
|
+
folder = os.path.basename(os.path.dirname(path[len(self.dlpath):]))
|
|
186
|
+
else:
|
|
187
|
+
folder = os.path.basename(os.path.dirname(path))
|
|
188
|
+
|
|
189
|
+
# The folder contains the tokens needed to perform
|
|
190
|
+
# matching of project, gitref, etc.
|
|
191
|
+
rinfo = re.findall(r'(?P<tag>[^-]+)-(?P<val>.*?)(?:__|$)', folder)
|
|
192
|
+
if rinfo is None or len(rinfo) == 0:
|
|
193
|
+
print('Incorrect folder/file name format for %s' % folder)
|
|
194
|
+
return None
|
|
195
|
+
|
|
196
|
+
info = dict(rinfo)
|
|
197
|
+
|
|
198
|
+
# Ignore AppVeyor Debug builds
|
|
199
|
+
if info.get('bldtype', '').lower() == 'debug':
|
|
200
|
+
print('Ignoring debug artifact %s' % folder)
|
|
201
|
+
return None
|
|
202
|
+
|
|
203
|
+
tag = info.get('tag', None)
|
|
204
|
+
if tag is not None and (len(tag) == 0 or tag.startswith('$(')):
|
|
205
|
+
# AppVeyor doesn't substite $(APPVEYOR_REPO_TAG_NAME)
|
|
206
|
+
# with an empty value when not set, it leaves that token
|
|
207
|
+
# in the string - so translate that to no tag.
|
|
208
|
+
del info['tag']
|
|
209
|
+
|
|
210
|
+
# Perform matching
|
|
211
|
+
unmatched = list()
|
|
212
|
+
for m, v in self.match.items():
|
|
213
|
+
if m not in info or info[m] != v:
|
|
214
|
+
unmatched.append(f"{m} = {v}")
|
|
215
|
+
|
|
216
|
+
# Make sure all matches were satisfied, unless this is a
|
|
217
|
+
# common artifact.
|
|
218
|
+
if info.get('p', '') != 'common' and len(unmatched) > 0:
|
|
219
|
+
return None
|
|
220
|
+
|
|
221
|
+
return Artifact(self, path, info)
|
|
222
|
+
|
|
223
|
+
def collect_s3(self):
|
|
224
|
+
""" Collect and download build-artifacts from S3 based on
|
|
225
|
+
git reference """
|
|
226
|
+
print(
|
|
227
|
+
'Collecting artifacts matching %s from S3 bucket %s' %
|
|
228
|
+
(self.match, s3_bucket))
|
|
229
|
+
self.s3 = boto3.resource('s3')
|
|
230
|
+
self.s3_bucket = self.s3.Bucket(s3_bucket)
|
|
231
|
+
self.s3_client = boto3.client('s3')
|
|
232
|
+
|
|
233
|
+
# note: list_objects will return at most 1000 objects per call,
|
|
234
|
+
# use continuation token to read full list.
|
|
235
|
+
cont_token = None
|
|
236
|
+
more = True
|
|
237
|
+
while more:
|
|
238
|
+
if cont_token is not None:
|
|
239
|
+
res = self.s3_client.list_objects_v2(
|
|
240
|
+
Bucket=s3_bucket,
|
|
241
|
+
Prefix='librdkafka/',
|
|
242
|
+
ContinuationToken=cont_token)
|
|
243
|
+
else:
|
|
244
|
+
res = self.s3_client.list_objects_v2(Bucket=s3_bucket,
|
|
245
|
+
Prefix='librdkafka/')
|
|
246
|
+
|
|
247
|
+
if res.get('IsTruncated') is True:
|
|
248
|
+
cont_token = res.get('NextContinuationToken')
|
|
249
|
+
else:
|
|
250
|
+
more = False
|
|
251
|
+
|
|
252
|
+
for item in res.get('Contents'):
|
|
253
|
+
self.collect_single(item.get('Key'))
|
|
254
|
+
|
|
255
|
+
for a in self.artifacts:
|
|
256
|
+
a.download()
|
|
257
|
+
|
|
258
|
+
def collect_local(self, path, req_tag=True):
|
|
259
|
+
""" Collect artifacts from a local directory possibly previously
|
|
260
|
+
collected from s3 """
|
|
261
|
+
for f in [os.path.join(dp, f) for dp, dn,
|
|
262
|
+
filenames in os.walk(path) for f in filenames]:
|
|
263
|
+
if not os.path.isfile(f):
|
|
264
|
+
continue
|
|
265
|
+
self.collect_single(f, req_tag)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
class Mapping (object):
|
|
269
|
+
""" Maps/matches a file in an input release artifact to
|
|
270
|
+
the output location of the package, based on attributes and paths. """
|
|
271
|
+
|
|
272
|
+
def __init__(self, attributes, artifact_fname_glob, path_in_artifact,
|
|
273
|
+
output_pkg_path=None, artifact_fname_excludes=[]):
|
|
274
|
+
"""
|
|
275
|
+
@param attributes A dict of artifact attributes that must match.
|
|
276
|
+
If an attribute name (dict key) is prefixed
|
|
277
|
+
with "!" (e.g., "!plat") then the attribute
|
|
278
|
+
must not match.
|
|
279
|
+
@param artifact_fname_glob Match artifacts with this filename glob.
|
|
280
|
+
@param path_in_artifact On match, extract this file in the artifact,..
|
|
281
|
+
@param output_pkg_path ..and write it to this location in the package.
|
|
282
|
+
Defaults to path_in_artifact.
|
|
283
|
+
@param artifact_fname_excludes Exclude artifacts matching these
|
|
284
|
+
filenames.
|
|
285
|
+
|
|
286
|
+
Pass a list of Mapping objects to FIXME to perform all mappings.
|
|
287
|
+
"""
|
|
288
|
+
super(Mapping, self).__init__()
|
|
289
|
+
self.attributes = attributes
|
|
290
|
+
self.fname_glob = artifact_fname_glob
|
|
291
|
+
self.input_path = path_in_artifact
|
|
292
|
+
if output_pkg_path is None:
|
|
293
|
+
self.output_path = self.input_path
|
|
294
|
+
else:
|
|
295
|
+
self.output_path = output_pkg_path
|
|
296
|
+
self.name = self.output_path
|
|
297
|
+
self.fname_excludes = artifact_fname_excludes
|
|
298
|
+
|
|
299
|
+
def __str__(self):
|
|
300
|
+
return self.name
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
class Package (object):
|
|
304
|
+
""" Generic Package class
|
|
305
|
+
A Package is a working container for one or more output
|
|
306
|
+
packages for a specific package type (e.g., nuget) """
|
|
307
|
+
|
|
308
|
+
def __init__(self, version, arts):
|
|
309
|
+
super(Package, self).__init__()
|
|
310
|
+
self.version = version
|
|
311
|
+
self.arts = arts
|
|
312
|
+
# These may be overwritten by specific sub-classes:
|
|
313
|
+
self.artifacts = arts.artifacts
|
|
314
|
+
# Staging path, filled in later.
|
|
315
|
+
self.stpath = None
|
|
316
|
+
self.kv = {'version': version}
|
|
317
|
+
self.files = dict()
|
|
318
|
+
|
|
319
|
+
def add_file(self, file):
|
|
320
|
+
self.files[file] = True
|
|
321
|
+
|
|
322
|
+
def build(self):
|
|
323
|
+
""" Build package output(s), return a list of paths "
|
|
324
|
+
to built packages """
|
|
325
|
+
raise NotImplementedError
|
|
326
|
+
|
|
327
|
+
def cleanup(self):
|
|
328
|
+
""" Optional cleanup routine for removing temporary files, etc. """
|
|
329
|
+
pass
|
|
330
|
+
|
|
331
|
+
def render(self, fname, destpath='.'):
|
|
332
|
+
""" Render template in file fname and save to destpath/fname,
|
|
333
|
+
where destpath is relative to stpath """
|
|
334
|
+
|
|
335
|
+
outf = os.path.join(self.stpath, destpath, fname)
|
|
336
|
+
|
|
337
|
+
if not os.path.isdir(os.path.dirname(outf)):
|
|
338
|
+
os.makedirs(os.path.dirname(outf), 0o0755)
|
|
339
|
+
|
|
340
|
+
with open(os.path.join('templates', fname), 'r') as tf:
|
|
341
|
+
tmpl = Template(tf.read())
|
|
342
|
+
with open(outf, 'w') as of:
|
|
343
|
+
of.write(tmpl.substitute(self.kv))
|
|
344
|
+
|
|
345
|
+
self.add_file(outf)
|
|
346
|
+
|
|
347
|
+
def copy_template(self, fname, target_fname=None, destpath='.'):
|
|
348
|
+
""" Copy template file to destpath/fname
|
|
349
|
+
where destpath is relative to stpath """
|
|
350
|
+
|
|
351
|
+
if target_fname is None:
|
|
352
|
+
target_fname = fname
|
|
353
|
+
outf = os.path.join(self.stpath, destpath, target_fname)
|
|
354
|
+
|
|
355
|
+
if not os.path.isdir(os.path.dirname(outf)):
|
|
356
|
+
os.makedirs(os.path.dirname(outf), 0o0755)
|
|
357
|
+
|
|
358
|
+
shutil.copy(os.path.join('templates', fname), outf)
|
|
359
|
+
|
|
360
|
+
self.add_file(outf)
|
|
361
|
+
|
|
362
|
+
def apply_mappings(self):
|
|
363
|
+
""" Applies a list of Mapping to match and extract files from
|
|
364
|
+
matching artifacts. If any of the listed Mappings can not be
|
|
365
|
+
fulfilled an exception is raised. """
|
|
366
|
+
|
|
367
|
+
assert self.mappings
|
|
368
|
+
assert len(self.mappings) > 0
|
|
369
|
+
|
|
370
|
+
for m in self.mappings:
|
|
371
|
+
|
|
372
|
+
artifact = None
|
|
373
|
+
for a in self.arts.artifacts:
|
|
374
|
+
found = True
|
|
375
|
+
|
|
376
|
+
for attr in m.attributes:
|
|
377
|
+
if attr[0] == '!':
|
|
378
|
+
# Require attribute NOT to match
|
|
379
|
+
origattr = attr
|
|
380
|
+
attr = attr[1:]
|
|
381
|
+
|
|
382
|
+
if attr in a.info and \
|
|
383
|
+
a.info[attr] == m.attributes[origattr]:
|
|
384
|
+
found = False
|
|
385
|
+
break
|
|
386
|
+
else:
|
|
387
|
+
# Require attribute to match
|
|
388
|
+
if attr not in a.info or \
|
|
389
|
+
a.info[attr] != m.attributes[attr]:
|
|
390
|
+
found = False
|
|
391
|
+
break
|
|
392
|
+
|
|
393
|
+
if not fnmatch(a.fname, m.fname_glob):
|
|
394
|
+
found = False
|
|
395
|
+
|
|
396
|
+
for exclude in m.fname_excludes:
|
|
397
|
+
if exclude in a.fname:
|
|
398
|
+
found = False
|
|
399
|
+
break
|
|
400
|
+
|
|
401
|
+
if found:
|
|
402
|
+
artifact = a
|
|
403
|
+
break
|
|
404
|
+
|
|
405
|
+
if artifact is None:
|
|
406
|
+
raise MissingArtifactError(
|
|
407
|
+
'%s: unable to find artifact with tags %s matching "%s"' %
|
|
408
|
+
(m, str(m.attributes), m.fname_glob))
|
|
409
|
+
|
|
410
|
+
output_path = os.path.join(self.stpath, m.output_path)
|
|
411
|
+
|
|
412
|
+
try:
|
|
413
|
+
zfile.ZFile.extract(artifact.lpath, m.input_path, output_path)
|
|
414
|
+
# except KeyError:
|
|
415
|
+
# continue
|
|
416
|
+
except Exception as e:
|
|
417
|
+
raise Exception(
|
|
418
|
+
'%s: file not found in archive %s: %s. Files in archive are:\n%s' % # noqa: E501
|
|
419
|
+
(m, artifact.lpath, e, '\n'.join(zfile.ZFile(
|
|
420
|
+
artifact.lpath).getnames())))
|
|
421
|
+
|
|
422
|
+
# Check that the file type matches.
|
|
423
|
+
if magic_mismatch(output_path, a):
|
|
424
|
+
os.unlink(output_path)
|
|
425
|
+
continue
|
|
426
|
+
|
|
427
|
+
# All mappings found and extracted.
|
|
428
|
+
|
|
429
|
+
def verify(self, path):
|
|
430
|
+
""" Verify package content based on the previously defined mappings """
|
|
431
|
+
|
|
432
|
+
missing = list()
|
|
433
|
+
with zfile.ZFile(path, 'r') as zf:
|
|
434
|
+
print('Verifying %s:' % path)
|
|
435
|
+
|
|
436
|
+
# Zipfiles may url-encode filenames, unquote them before matching.
|
|
437
|
+
pkgd = [unquote(x) for x in zf.getnames()]
|
|
438
|
+
missing = [x for x in self.mappings if x.output_path not in pkgd]
|
|
439
|
+
|
|
440
|
+
if len(missing) > 0:
|
|
441
|
+
print(
|
|
442
|
+
'Missing files in package %s:\n%s' %
|
|
443
|
+
(path, '\n'.join([str(x) for x in missing])))
|
|
444
|
+
print('Actual: %s' % '\n'.join(pkgd))
|
|
445
|
+
return False
|
|
446
|
+
|
|
447
|
+
print('OK - %d expected files found' % len(self.mappings))
|
|
448
|
+
return True
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#
|
|
3
|
+
# Upload NuGet package to NuGet.org using provided NuGet API key
|
|
4
|
+
#
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
key=$1
|
|
9
|
+
pkg=$2
|
|
10
|
+
|
|
11
|
+
if [[ -z $pkg ]]; then
|
|
12
|
+
echo "Usage: $0 <nuget.org-api-key> <nuget-package>"
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
set -u
|
|
17
|
+
|
|
18
|
+
docker run -t -v $PWD/$pkg:/$pkg mcr.microsoft.com/dotnet/sdk:3.1 \
|
|
19
|
+
dotnet nuget push /$pkg -n -s https://api.nuget.org/v3/index.json \
|
|
20
|
+
-k $key --source https://api.nuget.org/v3/index.json
|
|
21
|
+
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
#
|
|
3
|
+
#
|
|
4
|
+
# NuGet release packaging tool.
|
|
5
|
+
# Creates a NuGet package from CI artifacts on S3.
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
import argparse
|
|
12
|
+
import time
|
|
13
|
+
import packaging
|
|
14
|
+
import nugetpackage
|
|
15
|
+
import staticpackage
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
dry_run = False
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
if __name__ == '__main__':
|
|
22
|
+
|
|
23
|
+
parser = argparse.ArgumentParser()
|
|
24
|
+
parser.add_argument(
|
|
25
|
+
"--s3",
|
|
26
|
+
help="Collect artifacts from S3 bucket",
|
|
27
|
+
action="store_true")
|
|
28
|
+
parser.add_argument("--dry-run",
|
|
29
|
+
help="Locate artifacts but don't actually "
|
|
30
|
+
"download or do anything",
|
|
31
|
+
action="store_true")
|
|
32
|
+
parser.add_argument(
|
|
33
|
+
"--directory",
|
|
34
|
+
help="Download directory (default: dl-<tag>)",
|
|
35
|
+
default=None)
|
|
36
|
+
parser.add_argument(
|
|
37
|
+
"--no-cleanup",
|
|
38
|
+
help="Don't clean up temporary folders",
|
|
39
|
+
action="store_true")
|
|
40
|
+
parser.add_argument(
|
|
41
|
+
"--sha",
|
|
42
|
+
help="Also match on this git sha1",
|
|
43
|
+
default=None)
|
|
44
|
+
parser.add_argument(
|
|
45
|
+
"--ignore-tag",
|
|
46
|
+
help="Ignore the artifacts' tag attribute (for devel use only)",
|
|
47
|
+
action="store_true",
|
|
48
|
+
default=False)
|
|
49
|
+
parser.add_argument(
|
|
50
|
+
"--nuget-version",
|
|
51
|
+
help="The nuget package version (defaults to same as tag)",
|
|
52
|
+
default=None)
|
|
53
|
+
parser.add_argument("--upload", help="Upload package to after building, "
|
|
54
|
+
"using provided NuGet API key "
|
|
55
|
+
"(either file or the key itself)",
|
|
56
|
+
default=None,
|
|
57
|
+
type=str)
|
|
58
|
+
parser.add_argument(
|
|
59
|
+
"--class",
|
|
60
|
+
help="Packaging class (either NugetPackage or StaticPackage)",
|
|
61
|
+
default="NugetPackage",
|
|
62
|
+
dest="pkgclass")
|
|
63
|
+
parser.add_argument(
|
|
64
|
+
"--retries",
|
|
65
|
+
help="Number of retries to collect artifacts",
|
|
66
|
+
default=0,
|
|
67
|
+
type=int)
|
|
68
|
+
parser.add_argument("tag", help="Git tag to collect")
|
|
69
|
+
|
|
70
|
+
args = parser.parse_args()
|
|
71
|
+
dry_run = args.dry_run
|
|
72
|
+
retries = args.retries
|
|
73
|
+
if not args.directory:
|
|
74
|
+
args.directory = 'dl-%s' % args.tag
|
|
75
|
+
|
|
76
|
+
match = {}
|
|
77
|
+
if not args.ignore_tag:
|
|
78
|
+
match['tag'] = args.tag
|
|
79
|
+
|
|
80
|
+
if args.sha is not None:
|
|
81
|
+
match['sha'] = args.sha
|
|
82
|
+
|
|
83
|
+
if args.pkgclass == "NugetPackage":
|
|
84
|
+
pkgclass = nugetpackage.NugetPackage
|
|
85
|
+
elif args.pkgclass == "StaticPackage":
|
|
86
|
+
pkgclass = staticpackage.StaticPackage
|
|
87
|
+
else:
|
|
88
|
+
raise ValueError(f'Unknown packaging class {args.pkgclass}: '
|
|
89
|
+
'should be one of NugetPackage or StaticPackage')
|
|
90
|
+
|
|
91
|
+
try:
|
|
92
|
+
match.update(getattr(pkgclass, 'match'))
|
|
93
|
+
except BaseException:
|
|
94
|
+
pass
|
|
95
|
+
|
|
96
|
+
arts = packaging.Artifacts(match, args.directory)
|
|
97
|
+
|
|
98
|
+
# Collect common local artifacts, such as support files.
|
|
99
|
+
arts.collect_local('common', req_tag=False)
|
|
100
|
+
|
|
101
|
+
while True:
|
|
102
|
+
if args.s3:
|
|
103
|
+
arts.collect_s3()
|
|
104
|
+
|
|
105
|
+
arts.collect_local(arts.dlpath)
|
|
106
|
+
|
|
107
|
+
if len(arts.artifacts) == 0:
|
|
108
|
+
raise ValueError('No artifacts found for %s' % match)
|
|
109
|
+
|
|
110
|
+
print('Collected artifacts (%s):' % (arts.dlpath))
|
|
111
|
+
for a in arts.artifacts:
|
|
112
|
+
print(' %s' % a.lpath)
|
|
113
|
+
print('')
|
|
114
|
+
|
|
115
|
+
if args.nuget_version is not None:
|
|
116
|
+
package_version = args.nuget_version
|
|
117
|
+
else:
|
|
118
|
+
package_version = args.tag
|
|
119
|
+
|
|
120
|
+
print('')
|
|
121
|
+
|
|
122
|
+
if dry_run:
|
|
123
|
+
sys.exit(0)
|
|
124
|
+
|
|
125
|
+
print('Building packages:')
|
|
126
|
+
|
|
127
|
+
try:
|
|
128
|
+
p = pkgclass(package_version, arts)
|
|
129
|
+
pkgfile = p.build(buildtype='release')
|
|
130
|
+
break
|
|
131
|
+
except packaging.MissingArtifactError as e:
|
|
132
|
+
if retries <= 0 or not args.s3:
|
|
133
|
+
if not args.no_cleanup:
|
|
134
|
+
p.cleanup()
|
|
135
|
+
raise e
|
|
136
|
+
|
|
137
|
+
p.cleanup()
|
|
138
|
+
retries -= 1
|
|
139
|
+
print(e)
|
|
140
|
+
print('Retrying in 30 seconds')
|
|
141
|
+
time.sleep(30)
|
|
142
|
+
|
|
143
|
+
if not args.no_cleanup:
|
|
144
|
+
p.cleanup()
|
|
145
|
+
else:
|
|
146
|
+
print(' --no-cleanup: leaving %s' % p.stpath)
|
|
147
|
+
|
|
148
|
+
print('')
|
|
149
|
+
|
|
150
|
+
if not p.verify(pkgfile):
|
|
151
|
+
print('Package failed verification.')
|
|
152
|
+
sys.exit(1)
|
|
153
|
+
|
|
154
|
+
print('Created package: %s' % pkgfile)
|
|
155
|
+
|
|
156
|
+
if args.upload is not None:
|
|
157
|
+
if os.path.isfile(args.upload):
|
|
158
|
+
with open(args.upload, 'r') as f:
|
|
159
|
+
nuget_key = f.read().replace('\n', '')
|
|
160
|
+
else:
|
|
161
|
+
nuget_key = args.upload
|
|
162
|
+
|
|
163
|
+
print('Uploading %s to NuGet' % pkgfile)
|
|
164
|
+
r = os.system("./push-to-nuget.sh '%s' %s" % (nuget_key, pkgfile))
|
|
165
|
+
assert int(r) == 0, \
|
|
166
|
+
f"NuGet upload failed with exit code {r}, see previous errors"
|
|
167
|
+
print('%s successfully uploaded to NuGet' % pkgfile)
|