Packages
brod
3.16.3
4.5.7
4.5.6
4.5.5
4.5.4
4.5.3
4.5.2
4.5.1
4.5.0
4.4.7
4.4.6
4.4.5
4.4.4
4.4.3
4.4.2
4.4.1
4.4.0
4.3.3
4.3.2
4.3.1
4.3.0
4.2.0
4.1.1
4.1.0
4.0.0
3.19.1
3.19.0
3.18.0
3.17.1
3.17.0
3.16.5
3.16.4
3.16.3
3.16.2
3.16.1
3.16.0
3.15.6
3.15.5
3.15.4
3.15.3
3.15.1
3.15.0
3.14.0
3.13.0
3.12.0
3.11.0
3.10.0
3.9.5
3.9.3
3.9.2
3.9.1
3.9.0
3.8.1
3.8.0
3.7.11
3.7.10
3.7.9
3.7.8
3.7.7
3.7.6
3.7.5
3.7.4
3.7.3
3.7.2
3.7.1
3.7.0
3.6.2
3.6.1
3.6.0
3.5.2
3.5.1
3.5.0
3.4.0
3.3.5
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.2.0
3.0.0
2.5.0
2.4.1
2.4.0
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.1
2.2.16
2.2.15
2.2.14
2.2.12
2.2.11
2.2.10
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.12
2.1.11
2.1.10
2.1.8
2.1.7
2.1.4
2.1.2
2.0.0
Apache Kafka Erlang client library
Current section
113 Versions
Jump to
Current section
113 Versions
Compare versions
15
files changed
+146
additions
-95
deletions
| @@ -3,6 +3,9 @@ all: compile | |
| 3 3 | compile: |
| 4 4 | @rebar3 compile |
| 5 5 | |
| 6 | + lint: |
| 7 | + @rebar3 lint |
| 8 | + |
| 6 9 | test-env: |
| 7 10 | @./scripts/setup-test-env.sh |
| 8 11 | |
| @@ -21,7 +24,7 @@ clean: | |
| 21 24 | |
| 22 25 | hex-publish: clean |
| 23 26 | @rebar3 hex publish |
| 24 | - @rebar3 hex docs |
| 27 | + @rebar3 hex build |
| 25 28 | |
| 26 29 | ## tests that require kafka running at localhost |
| 27 30 | INTEGRATION_CTS = brod_cg_commits brod_client brod_compression brod_consumer brod_producer brod_group_subscriber brod_topic_subscriber brod |
| @@ -399,7 +399,7 @@ auth(Host :: string(), Sock :: gen_tcp:socket() | ssl:sslsocket(), | |
| 399 399 | ``` |
| 400 400 | |
| 401 401 | If authentication is successful - callback function should return an atom `ok`, otherwise - error tuple with reason description. |
| 402 | - For example, you can use `brod_gssapi` plugin (https://github.com/ElMaxo/brod_gssapi) for SASL GSSAPI authentication. |
| 402 | + For example, you can use `brod_gssapi` plugin (https://github.com/kafka4beam/brod_gssapi) for SASL GSSAPI authentication. |
| 403 403 | To use it - add it as dependency to your top level project that uses brod. |
| 404 404 | Then add `{sasl, {callback, brod_gssapi, {gssapi, Keytab, Principal}}}` to client config. |
| 405 405 | Keytab should be the keytab file path, and Principal should be a byte-list or binary string. |
| @@ -31,4 +31,4 @@ | |
| 31 31 | [{<<"app">>,<<"supervisor3">>}, |
| 32 32 | {<<"optional">>,false}, |
| 33 33 | {<<"requirement">>,<<"1.1.11">>}]}]}. |
| 34 | - {<<"version">>,<<"3.16.2">>}. |
| 34 | + {<<"version">>,<<"3.16.3">>}. |
| @@ -2,19 +2,61 @@ | |
| 2 2 | , {kafka_protocol, "4.0.3"} |
| 3 3 | , {snappyer, "1.2.8"} |
| 4 4 | ]}. |
| 5 | + {project_plugins, [{rebar3_lint, "~> 1.0.2"}]}. |
| 5 6 | {edoc_opts, [{preprocess, true}, {macros, [{build_brod_cli, true}]}]}. |
| 6 | - {erl_opts, [warn_unused_vars,warn_shadow_vars,warn_obsolete_guard,debug_info]}. |
| 7 | + {erl_opts, [warnings_as_errors, warn_unused_vars,warn_shadow_vars,warn_obsolete_guard,debug_info]}. |
| 7 8 | {xref_checks, [undefined_function_calls, undefined_functions, |
| 8 9 | locals_not_used, deprecated_function_calls, |
| 9 10 | deprecated_functions]}. |
| 10 | - |
| 11 | + {profiles, [ |
| 12 | + {brod_cli, [ |
| 13 | + {deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {branch, "0.1.3"}}} |
| 14 | + , {jsone, "1.7.0"} |
| 15 | + ]}, |
| 16 | + {erl_opts, [warnings_as_errors, {d, build_brod_cli}]}, |
| 17 | + {escript_name, brod_cli}, |
| 18 | + {relx, [{release, {brod, "i"}, % release the interactive shell as brod-i |
| 19 | + [brod, jsone, docopt]}, |
| 20 | + {include_erts, true}, |
| 21 | + {overlay, [{copy, "scripts/brod", "bin"}, |
| 22 | + {copy, "{{lib_dirs}}/crc32cer/priv/crc32cer*.so", "bin"}, |
| 23 | + {copy, "{{lib_dirs}}/snappyer/priv/snappyer.so", "bin"} |
| 24 | + ]} |
| 25 | + ]}]}, |
| 26 | + {test, [ |
| 27 | + {deps, [ {docopt, {git, "https://github.com/zmstone/docopt-erl.git", {branch, "0.1.3"}}} |
| 28 | + , {hut, "1.3.0"} |
| 29 | + , {jsone, "1.7.0"} |
| 30 | + , {meck, "0.9.2"} |
| 31 | + , {proper, "1.4.0"} |
| 32 | + , {snabbkaffe, "1.0.1"} |
| 33 | + ]}, |
| 34 | + {erl_opts, [warnings_as_errors, {d, build_brod_cli}]} |
| 35 | + ]} |
| 36 | + ]}. |
| 37 | + {ex_doc, |
| 38 | + [ {extras, |
| 39 | + [ {"changelog.md", #{title => "Changelog"}} |
| 40 | + , {"README.md", #{title => "Overview"}} |
| 41 | + , {"LICENSE", #{title => "License"}} |
| 42 | + , "guides/examples/elixir/Publisher.md" |
| 43 | + , "guides/examples/elixir/Consumer.md" |
| 44 | + , "guides/examples/Authentication.md" |
| 45 | + ]} |
| 46 | + , {groups_for_extras, [{"Elixir", [ <<"guides/examples/elixir/Publisher.md">> |
| 47 | + , <<"guides/examples/elixir/Consumer.md">> |
| 48 | + ]} |
| 49 | + ,{"Usage", [<<"guides/examples/Authentication.md">>]}]} |
| 50 | + , {main, "README.md"} |
| 51 | + , {homepage_url, "https://hexdocs.pm/brod"} |
| 52 | + , {source_url, "https://github.com/kafka4beam/brod"} |
| 53 | + , {api_reference, false} |
| 54 | + ]}. |
| 55 | + {hex, [{doc, ex_doc}]}. |
| 11 56 | {escript_incl_apps, [docopt, brod]}. |
| 12 | - |
| 13 57 | {ct_opts, [{enable_builtin_hooks, false}]}. |
| 14 | - |
| 15 58 | {dialyzer, [{warnings, [unknown]}]}. |
| 16 59 | {cover_enabled, true}. |
| 17 60 | {cover_opts, [verbose]}. |
| 18 61 | {cover_export_enabled, true}. |
| 19 | - |
| 20 62 | {plugins, [coveralls]}. |
| @@ -1,61 +1,22 @@ | |
| 1 | - IsRebar3 = erlang:function_exported(rebar3, main, 1), |
| 2 | - DocoptUrl = "https://github.com/zmstone/docopt-erl.git", |
| 3 | - DocOptTag = "0.1.3", |
| 4 | - DocoptDep = {docopt, {git, DocoptUrl, {branch, DocOptTag}}}, |
| 5 | - Snabbkaffe = {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "0.6.0"}}}, |
| 6 | - Profiles = |
| 7 | - {profiles, [ |
| 8 | - {brod_cli, [ |
| 9 | - {deps, [jsone, DocoptDep]}, |
| 10 | - {erl_opts, [{d, build_brod_cli}]}, |
| 11 | - {escript_name, brod_cli}, |
| 12 | - {relx, [{release, {brod, "i"}, % release the interactive shell as brod-i |
| 13 | - [brod, jsone, docopt]}, |
| 14 | - {include_erts, true}, |
| 15 | - {overlay, [{copy, "scripts/brod", "bin"}, |
| 16 | - {copy, "{{lib_dirs}}/crc32cer/priv/crc32cer*.so", "bin"}, |
| 17 | - {copy, "{{lib_dirs}}/snappyer/priv/snappyer.so", "bin"} |
| 18 | - ]} |
| 19 | - ]}]}, |
| 20 | - {test, [ |
| 21 | - {deps, [meck, proper, jsone, DocoptDep, Snabbkaffe]}, |
| 22 | - {erl_opts, [{d, build_brod_cli}]} |
| 23 | - ]} |
| 24 | - ]}, |
| 25 | - CONFIG1 = case IsRebar3 of |
| 26 | - true -> |
| 27 | - [Profiles | CONFIG]; |
| 28 | - false -> |
| 29 | - URLs = [ {supervisor3, "https://github.com/kafka4beam/supervisor3.git"} |
| 30 | - , {kafka_protocol, "https://github.com/kafka4beam/kafka_protocol.git"} |
| 31 | - ], |
| 32 | - Rebar3Deps = proplists:get_value(deps, CONFIG), |
| 33 | - Rebar2Deps = |
| 34 | - lists:map( |
| 35 | - fun({Name, URL}) -> |
| 36 | - case proplists:get_value(Name, Rebar3Deps) of |
| 37 | - {git, _, _} = Git -> {Name, ".*", Git}; |
| 38 | - Vsn -> {Name, ".*", {git, URL, {tag, Vsn}}} |
| 39 | - end |
| 40 | - end, URLs), |
| 41 | - lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps}) |
| 42 | - end, |
| 43 | - |
| 44 | - case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of |
| 1 | + Plugins = |
| 2 | + case erlang:list_to_integer(erlang:system_info(otp_release)) of |
| 3 | + Version when Version > 23 -> |
| 4 | + ExtraPlugins = [{rebar3_ex_doc, "~> 0.2.9"},{rebar3_hex, "~> 7.0.1"}], |
| 5 | + {project_plugins, lists:merge(ExtraPlugins, proplists:get_value(project_plugins, CONFIG))}; |
| 6 | + _ -> {project_plugins, proplists:get_value(project_plugins, CONFIG)} |
| 7 | + end, |
| 8 | + CoverallsConfigs = case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of |
| 45 9 | {"true", Token} when is_list(Token) -> |
| 46 | - CONFIG2 = [{coveralls_repo_token, Token}, |
| 10 | + Configs = [{coveralls_repo_token, Token}, |
| 47 11 | {coveralls_coverdata, "_build/test/cover/*.coverdata"}, |
| 48 12 | {coveralls_service_job_id, os:getenv("GITHUB_RUN_ID")}, |
| 49 13 | {coveralls_commit_sha, os:getenv("GITHUB_SHA")}, |
| 50 14 | {coveralls_service_name, "github"}, |
| 51 | - {coveralls_service_number, os:getenv("GITHUB_RUN_NUMBER")} | CONFIG1], |
| 52 | - case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request" |
| 53 | - andalso string:tokens(os:getenv("GITHUB_REF"), "/") of |
| 54 | - [_, "pull", PRNO, _] -> |
| 55 | - [{coveralls_service_pull_request, PRNO} | CONFIG2]; |
| 56 | - _ -> |
| 57 | - CONFIG2 |
| 15 | + {coveralls_service_number, os:getenv("GITHUB_RUN_NUMBER")}], |
| 16 | + case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request" andalso string:tokens(os:getenv("GITHUB_REF"), "/") of |
| 17 | + [_, "pull", PRNO, _] -> [{coveralls_service_pull_request, PRNO} | Configs]; |
| 18 | + _ -> Configs |
| 58 19 | end; |
| 59 | - _ -> |
| 60 | - CONFIG1 |
| 61 | - end. |
| 20 | + _ -> [] |
| 21 | + end, |
| 22 | + [Plugins | lists:merge(CoverallsConfigs, CONFIG)]. |
| \ No newline at end of file |
Loading more files…