waterdrop 1.4.4 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/ci.yml +3 -25
- data/.gitignore +2 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +8 -13
- data/Gemfile +9 -0
- data/Gemfile.lock +81 -60
- data/LICENSE +165 -0
- data/README.md +200 -57
- data/certs/mensfeld.pem +21 -21
- data/config/errors.yml +3 -16
- data/lib/water_drop/config.rb +42 -143
- data/lib/water_drop/contracts/config.rb +8 -121
- data/lib/water_drop/contracts/message.rb +41 -0
- data/lib/water_drop/contracts.rb +0 -2
- data/lib/water_drop/errors.rb +30 -5
- data/lib/water_drop/instrumentation/monitor.rb +16 -22
- data/lib/water_drop/instrumentation/stdout_listener.rb +113 -32
- data/lib/water_drop/producer/async.rb +51 -0
- data/lib/water_drop/producer/buffer.rb +113 -0
- data/lib/water_drop/producer/builder.rb +63 -0
- data/lib/water_drop/producer/dummy_client.rb +32 -0
- data/lib/water_drop/producer/statistics_decorator.rb +71 -0
- data/lib/water_drop/producer/status.rb +52 -0
- data/lib/water_drop/producer/sync.rb +65 -0
- data/lib/water_drop/producer.rb +142 -0
- data/lib/water_drop/version.rb +1 -1
- data/lib/water_drop.rb +4 -24
- data/waterdrop.gemspec +8 -8
- data.tar.gz.sig +0 -0
- metadata +53 -54
- metadata.gz.sig +0 -0
- data/MIT-LICENCE +0 -18
- data/lib/water_drop/async_producer.rb +0 -26
- data/lib/water_drop/base_producer.rb +0 -57
- data/lib/water_drop/config_applier.rb +0 -52
- data/lib/water_drop/contracts/message_options.rb +0 -19
- data/lib/water_drop/sync_producer.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21d904dd62018fd51b84d19d583c8b9d23e499f7ec348ea77f5652dfd80923ed
|
4
|
+
data.tar.gz: 57223b65ddefe69c322b9267b1caec34337f49eece49f5ceeac09030adbf8eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b26746357346b68312916f21581830d8b18af6b4233b80f73339ccc55f02e99a7a40d8f7558a64c4fb3325ba2c306a56e8870a5473d5f2e25ed5be08acb5d657
|
7
|
+
data.tar.gz: 725b540999dd4e9c05bc33280de6b732f9c601514d2b344160c3932b506b250d8e2082db77ad8f980c2b4d6512e48e70aba9439afb97f60a7db5c8375fcd3ac8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
open_collective: karafka
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
name: ci
|
2
2
|
|
3
3
|
on:
|
4
|
-
pull_request:
|
5
4
|
push:
|
6
5
|
schedule:
|
7
6
|
- cron: '0 1 * * *'
|
@@ -9,17 +8,16 @@ on:
|
|
9
8
|
jobs:
|
10
9
|
specs:
|
11
10
|
runs-on: ubuntu-latest
|
12
|
-
needs: diffend
|
13
11
|
strategy:
|
14
12
|
fail-fast: false
|
15
13
|
matrix:
|
16
14
|
ruby:
|
17
|
-
- '3.0'
|
18
15
|
- '2.7'
|
19
16
|
- '2.6'
|
20
|
-
- '
|
17
|
+
- '2.5'
|
18
|
+
- 'jruby'
|
21
19
|
include:
|
22
|
-
- ruby: '
|
20
|
+
- ruby: '2.7'
|
23
21
|
coverage: 'true'
|
24
22
|
steps:
|
25
23
|
- uses: actions/checkout@v2
|
@@ -43,26 +41,6 @@ jobs:
|
|
43
41
|
env:
|
44
42
|
GITHUB_COVERAGE: ${{matrix.coverage}}
|
45
43
|
run: bundle exec rspec
|
46
|
-
|
47
|
-
diffend:
|
48
|
-
runs-on: ubuntu-latest
|
49
|
-
strategy:
|
50
|
-
fail-fast: false
|
51
|
-
steps:
|
52
|
-
- uses: actions/checkout@v2
|
53
|
-
with:
|
54
|
-
fetch-depth: 0
|
55
|
-
- name: Set up Ruby
|
56
|
-
uses: ruby/setup-ruby@v1
|
57
|
-
with:
|
58
|
-
ruby-version: 3.0
|
59
|
-
- name: Install latest bundler
|
60
|
-
run: gem install bundler --no-document
|
61
|
-
- name: Install Diffend plugin
|
62
|
-
run: bundle plugin install diffend
|
63
|
-
- name: Bundle Secure
|
64
|
-
run: bundle secure
|
65
|
-
|
66
44
|
coditsu:
|
67
45
|
runs-on: ubuntu-latest
|
68
46
|
strategy:
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2.7.1
|
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,13 @@
|
|
1
1
|
# WaterDrop changelog
|
2
2
|
|
3
|
-
##
|
4
|
-
-
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
|
11
|
-
## 1.4.2 (2021-03-30)
|
12
|
-
- Additional 3.0 fixes (ojab)
|
13
|
-
|
14
|
-
## 1.4.1 (2021-03-23)
|
15
|
-
- Support for Ruby 3.0
|
3
|
+
## 2.0.0-rc1 (unreleased)
|
4
|
+
- Redesign of the whole API (see `README.md` for the use-cases and the current API)
|
5
|
+
- Replace `ruby-kafka` with `rdkafka`
|
6
|
+
- Switch license from `MIT` to `LGPL-3.0`
|
7
|
+
- #113 - Add some basic validations of the kafka scope of the config (Azdaroth)
|
8
|
+
- Global state removed
|
9
|
+
- Redesigned metrics that use `rdkafka` internal data + custom diffing
|
10
|
+
- Restore JRuby support
|
16
11
|
|
17
12
|
## 1.4.0 (2020-08-25)
|
18
13
|
- Release to match Karafka 1.4 versioning.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,97 +1,118 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
waterdrop (
|
5
|
-
|
6
|
-
dry-configurable (~> 0.
|
7
|
-
dry-monitor (~> 0.
|
8
|
-
dry-validation (~> 1.
|
9
|
-
|
10
|
-
zeitwerk (~> 2.
|
4
|
+
waterdrop (2.0.0.rc1)
|
5
|
+
concurrent-ruby (>= 1.1)
|
6
|
+
dry-configurable (~> 0.8)
|
7
|
+
dry-monitor (~> 0.3)
|
8
|
+
dry-validation (~> 1.3)
|
9
|
+
rdkafka (>= 0.6.0)
|
10
|
+
zeitwerk (~> 2.1)
|
11
11
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
activesupport (6.0.3.2)
|
16
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
+
i18n (>= 0.7, < 2)
|
18
|
+
minitest (~> 5.1)
|
19
|
+
tzinfo (~> 1.1)
|
20
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
21
|
+
byebug (11.1.3)
|
22
|
+
concurrent-ruby (1.1.7)
|
19
23
|
diff-lcs (1.4.4)
|
20
|
-
|
21
|
-
|
22
|
-
docile (1.4.0)
|
23
|
-
dry-configurable (0.13.0)
|
24
|
+
docile (1.3.2)
|
25
|
+
dry-configurable (0.11.6)
|
24
26
|
concurrent-ruby (~> 1.0)
|
25
|
-
dry-core (~> 0.
|
26
|
-
|
27
|
+
dry-core (~> 0.4, >= 0.4.7)
|
28
|
+
dry-equalizer (~> 0.2)
|
29
|
+
dry-container (0.7.2)
|
27
30
|
concurrent-ruby (~> 1.0)
|
28
|
-
dry-configurable (~> 0.
|
29
|
-
dry-core (0.
|
31
|
+
dry-configurable (~> 0.1, >= 0.1.3)
|
32
|
+
dry-core (0.4.9)
|
30
33
|
concurrent-ruby (~> 1.0)
|
31
|
-
dry-
|
34
|
+
dry-equalizer (0.3.0)
|
35
|
+
dry-events (0.2.0)
|
32
36
|
concurrent-ruby (~> 1.0)
|
33
|
-
dry-core (~> 0.
|
34
|
-
|
35
|
-
dry-
|
36
|
-
dry-
|
37
|
+
dry-core (~> 0.4)
|
38
|
+
dry-equalizer (~> 0.2)
|
39
|
+
dry-inflector (0.2.0)
|
40
|
+
dry-initializer (3.0.3)
|
41
|
+
dry-logic (1.0.7)
|
37
42
|
concurrent-ruby (~> 1.0)
|
38
|
-
dry-core (~> 0.
|
39
|
-
|
40
|
-
|
41
|
-
dry-
|
43
|
+
dry-core (~> 0.2)
|
44
|
+
dry-equalizer (~> 0.2)
|
45
|
+
dry-monitor (0.3.2)
|
46
|
+
dry-configurable (~> 0.5)
|
47
|
+
dry-core (~> 0.4)
|
48
|
+
dry-equalizer (~> 0.2)
|
42
49
|
dry-events (~> 0.2)
|
43
|
-
dry-schema (1.
|
50
|
+
dry-schema (1.5.4)
|
44
51
|
concurrent-ruby (~> 1.0)
|
45
|
-
dry-configurable (~> 0.
|
46
|
-
dry-core (~> 0.
|
52
|
+
dry-configurable (~> 0.8, >= 0.8.3)
|
53
|
+
dry-core (~> 0.4)
|
54
|
+
dry-equalizer (~> 0.2)
|
47
55
|
dry-initializer (~> 3.0)
|
48
56
|
dry-logic (~> 1.0)
|
49
|
-
dry-types (~> 1.
|
50
|
-
dry-types (1.
|
57
|
+
dry-types (~> 1.4)
|
58
|
+
dry-types (1.4.0)
|
51
59
|
concurrent-ruby (~> 1.0)
|
52
60
|
dry-container (~> 0.3)
|
53
|
-
dry-core (~> 0.
|
61
|
+
dry-core (~> 0.4, >= 0.4.4)
|
62
|
+
dry-equalizer (~> 0.3)
|
54
63
|
dry-inflector (~> 0.1, >= 0.1.2)
|
55
64
|
dry-logic (~> 1.0, >= 1.0.2)
|
56
|
-
dry-validation (1.
|
65
|
+
dry-validation (1.5.5)
|
57
66
|
concurrent-ruby (~> 1.0)
|
58
67
|
dry-container (~> 0.7, >= 0.7.1)
|
59
|
-
dry-core (~> 0.
|
68
|
+
dry-core (~> 0.4)
|
69
|
+
dry-equalizer (~> 0.2)
|
60
70
|
dry-initializer (~> 3.0)
|
61
|
-
dry-schema (~> 1.
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
+
dry-schema (~> 1.5)
|
72
|
+
factory_bot (6.1.0)
|
73
|
+
activesupport (>= 5.0.0)
|
74
|
+
ffi (1.13.1)
|
75
|
+
i18n (1.8.5)
|
76
|
+
concurrent-ruby (~> 1.0)
|
77
|
+
mini_portile2 (2.5.0)
|
78
|
+
minitest (5.14.2)
|
79
|
+
rake (13.0.1)
|
80
|
+
rdkafka (0.8.0)
|
81
|
+
ffi (~> 1.9)
|
82
|
+
mini_portile2 (~> 2.1)
|
83
|
+
rake (>= 12.3)
|
84
|
+
rspec (3.9.0)
|
85
|
+
rspec-core (~> 3.9.0)
|
86
|
+
rspec-expectations (~> 3.9.0)
|
87
|
+
rspec-mocks (~> 3.9.0)
|
88
|
+
rspec-core (3.9.2)
|
89
|
+
rspec-support (~> 3.9.3)
|
90
|
+
rspec-expectations (3.9.2)
|
71
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
|
-
rspec-support (~> 3.
|
73
|
-
rspec-mocks (3.
|
92
|
+
rspec-support (~> 3.9.0)
|
93
|
+
rspec-mocks (3.9.1)
|
74
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.
|
76
|
-
rspec-support (3.
|
77
|
-
|
78
|
-
digest-crc
|
79
|
-
simplecov (0.21.2)
|
95
|
+
rspec-support (~> 3.9.0)
|
96
|
+
rspec-support (3.9.3)
|
97
|
+
simplecov (0.19.0)
|
80
98
|
docile (~> 1.1)
|
81
99
|
simplecov-html (~> 0.11)
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
100
|
+
simplecov-html (0.12.2)
|
101
|
+
thread_safe (0.3.6)
|
102
|
+
tzinfo (1.2.7)
|
103
|
+
thread_safe (~> 0.1)
|
104
|
+
zeitwerk (2.4.0)
|
86
105
|
|
87
106
|
PLATFORMS
|
88
|
-
|
89
|
-
x86_64-linux
|
107
|
+
ruby
|
90
108
|
|
91
109
|
DEPENDENCIES
|
110
|
+
byebug
|
111
|
+
factory_bot
|
112
|
+
rdkafka
|
92
113
|
rspec
|
93
114
|
simplecov
|
94
115
|
waterdrop!
|
95
116
|
|
96
117
|
BUNDLED WITH
|
97
|
-
2.
|
118
|
+
2.1.4
|
data/LICENSE
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2
|
+
Version 3, 29 June 2007
|
3
|
+
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
6
|
+
of this license document, but changing it is not allowed.
|
7
|
+
|
8
|
+
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
11
|
+
License, supplemented by the additional permissions listed below.
|
12
|
+
|
13
|
+
0. Additional Definitions.
|
14
|
+
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
17
|
+
General Public License.
|
18
|
+
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
20
|
+
other than an Application or a Combined Work as defined below.
|
21
|
+
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
25
|
+
of using an interface provided by the Library.
|
26
|
+
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
28
|
+
Application with the Library. The particular version of the Library
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
30
|
+
Version".
|
31
|
+
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
35
|
+
based on the Application, and not on the Linked Version.
|
36
|
+
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
38
|
+
object code and/or source code for the Application, including any data
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
41
|
+
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
43
|
+
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
46
|
+
|
47
|
+
2. Conveying Modified Versions.
|
48
|
+
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
51
|
+
that uses the facility (other than as an argument passed when the
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
53
|
+
version:
|
54
|
+
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
56
|
+
ensure that, in the event an Application does not supply the
|
57
|
+
function or data, the facility still operates, and performs
|
58
|
+
whatever part of its purpose remains meaningful, or
|
59
|
+
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
61
|
+
this License applicable to that copy.
|
62
|
+
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
64
|
+
|
65
|
+
The object code form of an Application may incorporate material from
|
66
|
+
a header file that is part of the Library. You may convey such object
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
68
|
+
material is not limited to numerical parameters, data structure
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
71
|
+
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
73
|
+
Library is used in it and that the Library and its use are
|
74
|
+
covered by this License.
|
75
|
+
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
77
|
+
document.
|
78
|
+
|
79
|
+
4. Combined Works.
|
80
|
+
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
82
|
+
taken together, effectively do not restrict modification of the
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
85
|
+
the following:
|
86
|
+
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
88
|
+
the Library is used in it and that the Library and its use are
|
89
|
+
covered by this License.
|
90
|
+
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
92
|
+
document.
|
93
|
+
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
95
|
+
execution, include the copyright notice for the Library among
|
96
|
+
these notices, as well as a reference directing the user to the
|
97
|
+
copies of the GNU GPL and this license document.
|
98
|
+
|
99
|
+
d) Do one of the following:
|
100
|
+
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
102
|
+
License, and the Corresponding Application Code in a form
|
103
|
+
suitable for, and under terms that permit, the user to
|
104
|
+
recombine or relink the Application with a modified version of
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
107
|
+
Corresponding Source.
|
108
|
+
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
111
|
+
a copy of the Library already present on the user's computer
|
112
|
+
system, and (b) will operate properly with a modified version
|
113
|
+
of the Library that is interface-compatible with the Linked
|
114
|
+
Version.
|
115
|
+
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
117
|
+
be required to provide such information under section 6 of the
|
118
|
+
GNU GPL, and only to the extent that such information is
|
119
|
+
necessary to install and execute a modified version of the
|
120
|
+
Combined Work produced by recombining or relinking the
|
121
|
+
Application with a modified version of the Linked Version. (If
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
126
|
+
for conveying Corresponding Source.)
|
127
|
+
|
128
|
+
5. Combined Libraries.
|
129
|
+
|
130
|
+
You may place library facilities that are a work based on the
|
131
|
+
Library side by side in a single library together with other library
|
132
|
+
facilities that are not Applications and are not covered by this
|
133
|
+
License, and convey such a combined library under terms of your
|
134
|
+
choice, if you do both of the following:
|
135
|
+
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
137
|
+
on the Library, uncombined with any other library facilities,
|
138
|
+
conveyed under the terms of this License.
|
139
|
+
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
141
|
+
is a work based on the Library, and explaining where to find the
|
142
|
+
accompanying uncombined form of the same work.
|
143
|
+
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
145
|
+
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
148
|
+
versions will be similar in spirit to the present version, but may
|
149
|
+
differ in detail to address new problems or concerns.
|
150
|
+
|
151
|
+
Each version is given a distinguishing version number. If the
|
152
|
+
Library as you received it specifies that a certain numbered version
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
154
|
+
applies to it, you have the option of following the terms and
|
155
|
+
conditions either of that published version or of any later version
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
160
|
+
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
164
|
+
permanent authorization for you to choose that version for the
|
165
|
+
Library.
|