> callables = new ArrayList<>();
60 | ExecutorService executor = Executors.newFixedThreadPool(threads);
61 | Quantile quantile = new FrugalQuantile(4);
62 |
63 | @Setup
64 | public void setup() {
65 | for (int k = 0; k < threads; k++) {
66 | callables.add(
67 | () -> {
68 | for (int i = 0; i < limit; i++) {
69 | quantile.insert(i);
70 | }
71 | return quantile.estimation();
72 | });
73 | }
74 | }
75 |
76 | @TearDown
77 | public void teardown() {
78 | executor.shutdown();
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/proteus-common/src/main/java/io/netifi/proteus/common/stats/Ewma.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | * Copyright 2016 Netflix, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package io.netifi.proteus.common.stats;
18 |
19 | import io.netifi.proteus.common.time.Clock;
20 | import java.util.concurrent.TimeUnit;
21 |
22 | /**
23 | * Compute the exponential weighted moving average of a series of values. The time at which you
24 | * insert the value into `Ewma` is used to compute a weight (recent points are weighted higher). The
25 | * parameter for defining the convergence speed (like most decay process) is the half-life.
26 | *
27 | * e.g. with a half-life of 10 unit, if you insert 100 at t=0 and 200 at t=10 the ewma will be
28 | * equal to (200 - 100)/2 = 150 (half of the distance between the new and the old value)
29 | */
30 | public class Ewma {
31 | private final long tau;
32 | private volatile long stamp;
33 | private volatile double ewma;
34 |
35 | public Ewma(long halfLife, TimeUnit unit, double initialValue) {
36 | this.tau = Clock.DEFAULT.unit().convert((long) (halfLife / Math.log(2)), unit);
37 | stamp = 0L;
38 | ewma = initialValue;
39 | }
40 |
41 | public synchronized void insert(double x) {
42 | long now = Clock.DEFAULT.getEpochTime();
43 | double elapsed = Math.max(0, now - stamp);
44 | stamp = now;
45 |
46 | double w = Math.exp(-elapsed / tau);
47 | ewma = w * ewma + (1.0 - w) * x;
48 | }
49 |
50 | public synchronized void reset(double value) {
51 | stamp = 0L;
52 | ewma = value;
53 | }
54 |
55 | public double value() {
56 | return ewma;
57 | }
58 |
59 | @Override
60 | public String toString() {
61 | return "Ewma(value=" + ewma + ", age=" + (Clock.DEFAULT.getEpochTime() - stamp) + ")";
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/proteus-common/src/main/java/io/netifi/proteus/common/stats/Median.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | * Copyright 2016 Netflix, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package io.netifi.proteus.common.stats;
18 |
19 | /** This implementation gives better results because it considers more data-point. */
20 | public class Median extends FrugalQuantile {
21 | public Median() {
22 | super(0.5, 1.0);
23 | }
24 |
25 | public synchronized void reset() {
26 | super.reset(0.5);
27 | }
28 |
29 | @Override
30 | public synchronized void insert(double x) {
31 | if (sign == 0) {
32 | estimate = x;
33 | sign = 1;
34 | } else {
35 | if (x > estimate) {
36 | greaterThanZero(x);
37 | } else if (x < estimate) {
38 | lessThanZero(x);
39 | }
40 | }
41 | }
42 |
43 | private void greaterThanZero(double x) {
44 | step += sign;
45 |
46 | if (step > 0) {
47 | estimate += step;
48 | } else {
49 | estimate += 1;
50 | }
51 |
52 | if (estimate > x) {
53 | step += (x - estimate);
54 | estimate = x;
55 | }
56 |
57 | if (sign < 0) {
58 | step = 1;
59 | }
60 |
61 | sign = 1;
62 | }
63 |
64 | private void lessThanZero(double x) {
65 | step -= sign;
66 |
67 | if (step > 0) {
68 | estimate -= step;
69 | } else {
70 | estimate--;
71 | }
72 |
73 | if (estimate < x) {
74 | step += (estimate - x);
75 | estimate = x;
76 | }
77 |
78 | if (sign > 0) {
79 | step = 1;
80 | }
81 |
82 | sign = -1;
83 | }
84 |
85 | @Override
86 | public String toString() {
87 | return "Median(v=" + estimate + ")";
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/proteus-common/src/main/java/io/netifi/proteus/common/stats/Quantile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | * Copyright 2016 Netflix, Inc.
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package io.netifi.proteus.common.stats;
18 |
19 | public interface Quantile {
20 | /** @return the estimation of the current value of the quantile */
21 | double estimation();
22 |
23 | /**
24 | * Insert a data point `x` in the quantile estimator.
25 | *
26 | * @param x the data point to add.
27 | */
28 | void insert(double x);
29 | }
30 |
--------------------------------------------------------------------------------
/proteus-common/src/main/java/io/netifi/proteus/common/tags/ImmutableTag.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2017 Pivotal Software, Inc.
3 | *
4 | *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5 | * except in compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | *
Unless required by applicable law or agreed to in writing, software distributed under the
10 | * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11 | * express or implied. See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package io.netifi.proteus.common.tags;
15 |
16 | import static java.util.Objects.requireNonNull;
17 |
18 | import java.util.Objects;
19 |
20 | public class ImmutableTag implements Tag {
21 | private String key;
22 | private String value;
23 |
24 | public ImmutableTag(String key, String value) {
25 | requireNonNull(key);
26 | requireNonNull(value);
27 | this.key = key;
28 | this.value = value;
29 | }
30 |
31 | @Override
32 | public String getKey() {
33 | return key;
34 | }
35 |
36 | @Override
37 | public String getValue() {
38 | return value;
39 | }
40 |
41 | @Override
42 | public boolean equals(Object o) {
43 | if (this == o) return true;
44 | if (o == null || getClass() != o.getClass()) return false;
45 | Tag that = (Tag) o;
46 | return Objects.equals(key, that.getKey()) && Objects.equals(value, that.getValue());
47 | }
48 |
49 | @Override
50 | public int hashCode() {
51 | int result = key.hashCode();
52 | result = 31 * result + value.hashCode();
53 | return result;
54 | }
55 |
56 | @Override
57 | public String toString() {
58 | return "tag(" + key + "=" + value + ")";
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/proteus-common/src/main/java/io/netifi/proteus/common/tags/Tag.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2017 Pivotal Software, Inc.
3 | *
4 | *
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
5 | * except in compliance with the License. You may obtain a copy of the License at
6 | *
7 | *
http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | *
Unless required by applicable law or agreed to in writing, software distributed under the
10 | * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11 | * express or implied. See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package io.netifi.proteus.common.tags;
15 |
16 | /**
17 | * Key/value pair representing a dimension of a meter used to classify and drill into measurements.
18 | *
19 | * @author Jon Schneider
20 | */
21 | public interface Tag extends Comparable {
22 | String getKey();
23 |
24 | String getValue();
25 |
26 | static Tag of(String key, String value) {
27 | return new ImmutableTag(key, value);
28 | }
29 |
30 | @Override
31 | default int compareTo(Tag o) {
32 | return getKey().compareTo(o.getKey());
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/proteus-common/src/main/java/io/netifi/proteus/common/time/Clock.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.common.time;
17 |
18 | import java.util.concurrent.TimeUnit;
19 |
20 | @FunctionalInterface
21 | public interface Clock {
22 | long getEpochTime();
23 |
24 | default long elapsedSince(long timestamp) {
25 | long t = getEpochTime();
26 | return Math.max(0L, t - timestamp);
27 | }
28 |
29 | default TimeUnit unit() {
30 | return TimeUnit.MILLISECONDS;
31 | }
32 |
33 | Clock DEFAULT = System::currentTimeMillis;
34 | }
35 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'Netifi Proteus Discovery Library For AWS'
2 |
3 | dependencyManagement {
4 | imports {
5 | mavenBom 'software.amazon.awssdk:bom:2.4.13'
6 | }
7 | }
8 |
9 | dependencies {
10 | implementation project(':proteus-common')
11 | implementation project(':proteus-discovery')
12 | implementation 'software.amazon.awssdk:ec2'
13 | implementation 'io.projectreactor:reactor-core'
14 | implementation 'org.slf4j:slf4j-api'
15 |
16 | compileOnly 'javax.inject:javax.inject'
17 |
18 | testCompile 'junit:junit'
19 | testCompile 'javax.inject:javax.inject'
20 | testCompile 'io.projectreactor:reactor-test'
21 | testCompile "com.google.protobuf:protobuf-java"
22 | testCompile 'org.hdrhistogram:HdrHistogram'
23 | testCompile 'org.apache.logging.log4j:log4j-api'
24 | testCompile 'org.apache.logging.log4j:log4j-core'
25 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
26 | testCompile 'io.rsocket:rsocket-transport-netty'
27 | testCompile 'io.rsocket:rsocket-transport-local'
28 | testCompile 'org.mockito:mockito-core'
29 | }
30 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | io.projectreactor:reactor-core:3.2.6.RELEASE
8 | javax.inject:javax.inject:1
9 | org.reactivestreams:reactive-streams:1.0.2
10 | org.slf4j:slf4j-api:1.7.25
11 | software.amazon.awssdk:annotations:2.4.13
12 | software.amazon.awssdk:auth:2.4.13
13 | software.amazon.awssdk:aws-core:2.4.13
14 | software.amazon.awssdk:aws-query-protocol:2.4.13
15 | software.amazon.awssdk:ec2:2.4.13
16 | software.amazon.awssdk:http-client-spi:2.4.13
17 | software.amazon.awssdk:profiles:2.4.13
18 | software.amazon.awssdk:protocol-core:2.4.13
19 | software.amazon.awssdk:regions:2.4.13
20 | software.amazon.awssdk:sdk-core:2.4.13
21 | software.amazon.awssdk:utils:2.4.13
22 | software.amazon:flow:1.7
23 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/gradle/dependency-locks/testAnnotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.google.protobuf:protobuf-java:3.6.1
8 | io.netty:netty-buffer:4.1.31.Final
9 | io.netty:netty-codec-http2:4.1.31.Final
10 | io.netty:netty-codec-http:4.1.31.Final
11 | io.netty:netty-codec-socks:4.1.31.Final
12 | io.netty:netty-codec:4.1.31.Final
13 | io.netty:netty-common:4.1.31.Final
14 | io.netty:netty-handler-proxy:4.1.31.Final
15 | io.netty:netty-handler:4.1.31.Final
16 | io.netty:netty-resolver:4.1.31.Final
17 | io.netty:netty-transport-native-epoll:4.1.31.Final
18 | io.netty:netty-transport-native-unix-common:4.1.31.Final
19 | io.netty:netty-transport:4.1.31.Final
20 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
21 | io.projectreactor:reactor-core:3.2.6.RELEASE
22 | io.projectreactor:reactor-test:3.2.6.RELEASE
23 | io.rsocket:rsocket-core:0.11.17.2
24 | io.rsocket:rsocket-transport-local:0.11.17.2
25 | io.rsocket:rsocket-transport-netty:0.11.17.2
26 | javax.inject:javax.inject:1
27 | junit:junit:4.12
28 | net.bytebuddy:byte-buddy-agent:1.9.7
29 | net.bytebuddy:byte-buddy:1.9.7
30 | org.apache.logging.log4j:log4j-api:2.11.2
31 | org.apache.logging.log4j:log4j-core:2.11.2
32 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
33 | org.hamcrest:hamcrest-core:1.3
34 | org.hdrhistogram:HdrHistogram:2.1.10
35 | org.mockito:mockito-core:2.25.0
36 | org.objenesis:objenesis:2.6
37 | org.reactivestreams:reactive-streams:1.0.2
38 | org.slf4j:slf4j-api:1.7.25
39 | software.amazon.awssdk:annotations:2.4.13
40 | software.amazon.awssdk:auth:2.4.13
41 | software.amazon.awssdk:aws-core:2.4.13
42 | software.amazon.awssdk:aws-query-protocol:2.4.13
43 | software.amazon.awssdk:ec2:2.4.13
44 | software.amazon.awssdk:http-client-spi:2.4.13
45 | software.amazon.awssdk:profiles:2.4.13
46 | software.amazon.awssdk:protocol-core:2.4.13
47 | software.amazon.awssdk:regions:2.4.13
48 | software.amazon.awssdk:sdk-core:2.4.13
49 | software.amazon.awssdk:utils:2.4.13
50 | software.amazon:flow:1.7
51 |
--------------------------------------------------------------------------------
/proteus-discovery-aws/gradle/dependency-locks/testRuntimeClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.google.protobuf:protobuf-java:3.6.1
8 | com.typesafe.netty:netty-reactive-streams-http:2.0.0
9 | com.typesafe.netty:netty-reactive-streams:2.0.0
10 | commons-codec:commons-codec:1.10
11 | commons-logging:commons-logging:1.2
12 | io.netty:netty-buffer:4.1.31.Final
13 | io.netty:netty-codec-http2:4.1.31.Final
14 | io.netty:netty-codec-http:4.1.31.Final
15 | io.netty:netty-codec-socks:4.1.31.Final
16 | io.netty:netty-codec:4.1.31.Final
17 | io.netty:netty-common:4.1.31.Final
18 | io.netty:netty-handler-proxy:4.1.31.Final
19 | io.netty:netty-handler:4.1.31.Final
20 | io.netty:netty-resolver:4.1.31.Final
21 | io.netty:netty-transport-native-epoll:4.1.31.Final
22 | io.netty:netty-transport-native-unix-common:4.1.31.Final
23 | io.netty:netty-transport:4.1.31.Final
24 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
25 | io.projectreactor:reactor-core:3.2.6.RELEASE
26 | io.projectreactor:reactor-test:3.2.6.RELEASE
27 | io.rsocket:rsocket-core:0.11.17.2
28 | io.rsocket:rsocket-transport-local:0.11.17.2
29 | io.rsocket:rsocket-transport-netty:0.11.17.2
30 | javax.inject:javax.inject:1
31 | junit:junit:4.12
32 | net.bytebuddy:byte-buddy-agent:1.9.7
33 | net.bytebuddy:byte-buddy:1.9.7
34 | org.apache.httpcomponents:httpclient:4.5.6
35 | org.apache.httpcomponents:httpcore:4.4.10
36 | org.apache.logging.log4j:log4j-api:2.11.2
37 | org.apache.logging.log4j:log4j-core:2.11.2
38 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
39 | org.hamcrest:hamcrest-core:1.3
40 | org.hdrhistogram:HdrHistogram:2.1.10
41 | org.mockito:mockito-core:2.25.0
42 | org.objenesis:objenesis:2.6
43 | org.reactivestreams:reactive-streams:1.0.2
44 | org.slf4j:slf4j-api:1.7.25
45 | software.amazon.awssdk:annotations:2.4.13
46 | software.amazon.awssdk:apache-client:2.4.13
47 | software.amazon.awssdk:auth:2.4.13
48 | software.amazon.awssdk:aws-core:2.4.13
49 | software.amazon.awssdk:aws-query-protocol:2.4.13
50 | software.amazon.awssdk:ec2:2.4.13
51 | software.amazon.awssdk:http-client-spi:2.4.13
52 | software.amazon.awssdk:netty-nio-client:2.4.13
53 | software.amazon.awssdk:profiles:2.4.13
54 | software.amazon.awssdk:protocol-core:2.4.13
55 | software.amazon.awssdk:regions:2.4.13
56 | software.amazon.awssdk:sdk-core:2.4.13
57 | software.amazon.awssdk:utils:2.4.13
58 | software.amazon:flow:1.7
59 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'Netifi Proteus Discovery Library For Consul'
2 |
3 | dependencies {
4 | implementation project(':proteus-common')
5 | implementation project(':proteus-discovery')
6 | implementation 'com.orbitz.consul:consul-client:1.3.0'
7 | implementation 'io.projectreactor:reactor-core'
8 | implementation 'org.slf4j:slf4j-api'
9 | compileOnly 'javax.inject:javax.inject'
10 |
11 | testCompile 'junit:junit'
12 | testCompile 'javax.inject:javax.inject'
13 | testCompile 'io.projectreactor:reactor-test'
14 | testCompile "com.google.protobuf:protobuf-java"
15 | testCompile 'org.hdrhistogram:HdrHistogram'
16 | testCompile 'org.apache.logging.log4j:log4j-api'
17 | testCompile 'org.apache.logging.log4j:log4j-core'
18 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
19 | testCompile 'io.rsocket:rsocket-transport-netty'
20 | testCompile 'io.rsocket:rsocket-transport-local'
21 | testCompile 'org.mockito:mockito-core'
22 | }
23 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.datatype:jackson-datatype-guava:2.9.8
8 | com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8
9 | com.google.code.findbugs:jsr305:3.0.2
10 | com.google.errorprone:error_prone_annotations:2.2.0
11 | com.google.guava:failureaccess:1.0.1
12 | com.google.guava:guava:27.0.1-jre
13 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
14 | com.google.j2objc:j2objc-annotations:1.1
15 | com.orbitz.consul:consul-client:1.3.0
16 | com.squareup.okhttp3:okhttp:3.9.0
17 | com.squareup.okio:okio:1.13.0
18 | com.squareup.retrofit2:converter-jackson:2.3.0
19 | com.squareup.retrofit2:retrofit:2.3.0
20 | io.projectreactor:reactor-core:3.2.6.RELEASE
21 | javax.inject:javax.inject:1
22 | org.apache.commons:commons-lang3:3.4
23 | org.checkerframework:checker-qual:2.5.2
24 | org.codehaus.mojo:animal-sniffer-annotations:1.17
25 | org.reactivestreams:reactive-streams:1.0.2
26 | org.slf4j:slf4j-api:1.7.25
27 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/gradle/dependency-locks/testAnnotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.datatype:jackson-datatype-guava:2.9.8
8 | com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8
9 | com.google.code.findbugs:jsr305:3.0.2
10 | com.google.errorprone:error_prone_annotations:2.2.0
11 | com.google.guava:failureaccess:1.0.1
12 | com.google.guava:guava:27.0.1-jre
13 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
14 | com.google.j2objc:j2objc-annotations:1.1
15 | com.google.protobuf:protobuf-java:3.6.1
16 | com.orbitz.consul:consul-client:1.3.0
17 | com.squareup.okhttp3:okhttp:3.9.0
18 | com.squareup.okio:okio:1.13.0
19 | com.squareup.retrofit2:converter-jackson:2.3.0
20 | com.squareup.retrofit2:retrofit:2.3.0
21 | io.netty:netty-buffer:4.1.31.Final
22 | io.netty:netty-codec-http2:4.1.31.Final
23 | io.netty:netty-codec-http:4.1.31.Final
24 | io.netty:netty-codec-socks:4.1.31.Final
25 | io.netty:netty-codec:4.1.31.Final
26 | io.netty:netty-common:4.1.31.Final
27 | io.netty:netty-handler-proxy:4.1.31.Final
28 | io.netty:netty-handler:4.1.31.Final
29 | io.netty:netty-resolver:4.1.31.Final
30 | io.netty:netty-transport-native-epoll:4.1.31.Final
31 | io.netty:netty-transport-native-unix-common:4.1.31.Final
32 | io.netty:netty-transport:4.1.31.Final
33 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
34 | io.projectreactor:reactor-core:3.2.6.RELEASE
35 | io.projectreactor:reactor-test:3.2.6.RELEASE
36 | io.rsocket:rsocket-core:0.11.17.2
37 | io.rsocket:rsocket-transport-local:0.11.17.2
38 | io.rsocket:rsocket-transport-netty:0.11.17.2
39 | javax.inject:javax.inject:1
40 | junit:junit:4.12
41 | net.bytebuddy:byte-buddy-agent:1.9.7
42 | net.bytebuddy:byte-buddy:1.9.7
43 | org.apache.commons:commons-lang3:3.4
44 | org.apache.logging.log4j:log4j-api:2.11.2
45 | org.apache.logging.log4j:log4j-core:2.11.2
46 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
47 | org.checkerframework:checker-qual:2.5.2
48 | org.codehaus.mojo:animal-sniffer-annotations:1.17
49 | org.hamcrest:hamcrest-core:1.3
50 | org.hdrhistogram:HdrHistogram:2.1.10
51 | org.mockito:mockito-core:2.25.0
52 | org.objenesis:objenesis:2.6
53 | org.reactivestreams:reactive-streams:1.0.2
54 | org.slf4j:slf4j-api:1.7.25
55 |
--------------------------------------------------------------------------------
/proteus-discovery-consul/gradle/dependency-locks/testRuntimeClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.datatype:jackson-datatype-guava:2.9.8
8 | com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8
9 | com.google.code.findbugs:jsr305:3.0.2
10 | com.google.errorprone:error_prone_annotations:2.2.0
11 | com.google.guava:failureaccess:1.0.1
12 | com.google.guava:guava:27.0.1-jre
13 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
14 | com.google.j2objc:j2objc-annotations:1.1
15 | com.google.protobuf:protobuf-java:3.6.1
16 | com.orbitz.consul:consul-client:1.3.0
17 | com.squareup.okhttp3:okhttp:3.9.0
18 | com.squareup.okio:okio:1.13.0
19 | com.squareup.retrofit2:converter-jackson:2.3.0
20 | com.squareup.retrofit2:retrofit:2.3.0
21 | io.netty:netty-buffer:4.1.31.Final
22 | io.netty:netty-codec-http2:4.1.31.Final
23 | io.netty:netty-codec-http:4.1.31.Final
24 | io.netty:netty-codec-socks:4.1.31.Final
25 | io.netty:netty-codec:4.1.31.Final
26 | io.netty:netty-common:4.1.31.Final
27 | io.netty:netty-handler-proxy:4.1.31.Final
28 | io.netty:netty-handler:4.1.31.Final
29 | io.netty:netty-resolver:4.1.31.Final
30 | io.netty:netty-transport-native-epoll:4.1.31.Final
31 | io.netty:netty-transport-native-unix-common:4.1.31.Final
32 | io.netty:netty-transport:4.1.31.Final
33 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
34 | io.projectreactor:reactor-core:3.2.6.RELEASE
35 | io.projectreactor:reactor-test:3.2.6.RELEASE
36 | io.rsocket:rsocket-core:0.11.17.2
37 | io.rsocket:rsocket-transport-local:0.11.17.2
38 | io.rsocket:rsocket-transport-netty:0.11.17.2
39 | javax.inject:javax.inject:1
40 | junit:junit:4.12
41 | net.bytebuddy:byte-buddy-agent:1.9.7
42 | net.bytebuddy:byte-buddy:1.9.7
43 | org.apache.commons:commons-lang3:3.4
44 | org.apache.logging.log4j:log4j-api:2.11.2
45 | org.apache.logging.log4j:log4j-core:2.11.2
46 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
47 | org.checkerframework:checker-qual:2.5.2
48 | org.codehaus.mojo:animal-sniffer-annotations:1.17
49 | org.hamcrest:hamcrest-core:1.3
50 | org.hdrhistogram:HdrHistogram:2.1.10
51 | org.mockito:mockito-core:2.25.0
52 | org.objenesis:objenesis:2.6
53 | org.reactivestreams:reactive-streams:1.0.2
54 | org.slf4j:slf4j-api:1.7.25
55 |
--------------------------------------------------------------------------------
/proteus-discovery-kubernetes/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'Netifi Proteus Discovery Library For Kubernetes'
2 |
3 | dependencies {
4 | implementation project(':proteus-common')
5 | implementation project(':proteus-discovery')
6 | implementation 'io.kubernetes:client-java:3.0.0'
7 | implementation 'io.projectreactor:reactor-core'
8 | implementation 'org.slf4j:slf4j-api'
9 | compileOnly 'javax.inject:javax.inject'
10 |
11 | testCompile 'junit:junit'
12 | testCompile 'javax.inject:javax.inject'
13 | testCompile 'io.projectreactor:reactor-test'
14 | testCompile "com.google.protobuf:protobuf-java"
15 | testCompile 'org.hdrhistogram:HdrHistogram'
16 | testCompile 'org.apache.logging.log4j:log4j-api'
17 | testCompile 'org.apache.logging.log4j:log4j-core'
18 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
19 | testCompile 'io.rsocket:rsocket-transport-netty'
20 | testCompile 'io.rsocket:rsocket-transport-local'
21 | testCompile 'org.mockito:mockito-core'
22 | }
23 |
--------------------------------------------------------------------------------
/proteus-discovery-kubernetes/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery-kubernetes/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.github.stephenc.jcip:jcip-annotations:1.0-1
5 | com.google.code.findbugs:jsr305:3.0.2
6 | com.google.code.gson:gson:2.8.0
7 | com.google.errorprone:error_prone_annotations:2.2.0
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | com.google.protobuf:protobuf-java:3.6.1
13 | com.microsoft.azure:adal4j:1.6.0
14 | com.nimbusds:lang-tag:1.4.4
15 | com.nimbusds:nimbus-jose-jwt:7.1
16 | com.nimbusds:oauth2-oidc-sdk:5.24.1
17 | com.squareup.okhttp:logging-interceptor:2.7.5
18 | com.squareup.okhttp:okhttp-ws:2.7.5
19 | com.squareup.okhttp:okhttp:2.7.5
20 | com.squareup.okio:okio:1.6.0
21 | commons-codec:commons-codec:1.11
22 | io.kubernetes:client-java-api:3.0.0
23 | io.kubernetes:client-java-proto:3.0.0
24 | io.kubernetes:client-java:3.0.0
25 | io.projectreactor:reactor-core:3.2.6.RELEASE
26 | io.sundr:builder-annotations:0.9.2
27 | io.sundr:resourcecify-annotations:0.9.2
28 | io.sundr:sundr-codegen:0.9.2
29 | io.sundr:sundr-core:0.9.2
30 | io.swagger:swagger-annotations:1.5.12
31 | javax.activation:activation:1.1
32 | javax.inject:javax.inject:1
33 | javax.mail:mail:1.4.7
34 | joda-time:joda-time:2.9.3
35 | net.minidev:json-smart:1.3.1
36 | org.apache.commons:commons-collections4:4.1
37 | org.apache.commons:commons-compress:1.18
38 | org.apache.commons:commons-lang3:3.7
39 | org.bouncycastle:bcpkix-jdk15on:1.59
40 | org.bouncycastle:bcprov-ext-jdk15on:1.59
41 | org.bouncycastle:bcprov-jdk15on:1.59
42 | org.checkerframework:checker-qual:2.5.2
43 | org.codehaus.mojo:animal-sniffer-annotations:1.17
44 | org.joda:joda-convert:1.2
45 | org.reactivestreams:reactive-streams:1.0.2
46 | org.slf4j:slf4j-api:1.7.25
47 | org.yaml:snakeyaml:1.19
48 |
--------------------------------------------------------------------------------
/proteus-discovery-kubernetes/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-discovery-kubernetes/gradle/dependency-locks/testAnnotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'Netifi Proteus Discovery Library'
2 |
3 | dependencies {
4 | implementation project(':proteus-common')
5 | implementation 'io.projectreactor:reactor-core'
6 | implementation 'org.slf4j:slf4j-api'
7 | compileOnly 'javax.inject:javax.inject'
8 |
9 | testCompile 'junit:junit'
10 | testCompile 'javax.inject:javax.inject'
11 | testCompile 'io.projectreactor:reactor-test'
12 | testCompile "com.google.protobuf:protobuf-java"
13 | testCompile 'org.hdrhistogram:HdrHistogram'
14 | testCompile 'org.apache.logging.log4j:log4j-api'
15 | testCompile 'org.apache.logging.log4j:log4j-core'
16 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
17 | testCompile 'io.rsocket:rsocket-transport-netty'
18 | testCompile 'io.rsocket:rsocket-transport-local'
19 | testCompile 'org.mockito:mockito-core'
20 | }
21 |
--------------------------------------------------------------------------------
/proteus-discovery/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.projectreactor:reactor-core:3.2.6.RELEASE
5 | javax.inject:javax.inject:1
6 | org.reactivestreams:reactive-streams:1.0.2
7 | org.slf4j:slf4j-api:1.7.25
8 |
--------------------------------------------------------------------------------
/proteus-discovery/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-discovery/gradle/dependency-locks/testAnnotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-discovery/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-discovery/gradle/dependency-locks/testRuntimeClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-discovery/src/main/java/io/netifi/proteus/discovery/DiscoveryConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.discovery;
17 |
18 | public interface DiscoveryConfig {
19 | Class getDiscoveryStrategyClass();
20 | }
21 |
--------------------------------------------------------------------------------
/proteus-discovery/src/main/java/io/netifi/proteus/discovery/DiscoveryStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.discovery;
17 |
18 | import io.netifi.proteus.common.net.HostAndPort;
19 | import java.lang.reflect.Constructor;
20 | import java.util.Collection;
21 | import java.util.Objects;
22 | import reactor.core.Exceptions;
23 | import reactor.core.publisher.Mono;
24 |
25 | public interface DiscoveryStrategy {
26 |
27 | static DiscoveryStrategy getInstance(DiscoveryConfig discoveryConfig) {
28 | Objects.requireNonNull(discoveryConfig);
29 | try {
30 | Class discoveryStrategyClass = discoveryConfig.getDiscoveryStrategyClass();
31 | Constructor discoveryStrategyClassConstructor =
32 | discoveryStrategyClass.getConstructor(discoveryConfig.getClass());
33 | return (DiscoveryStrategy) discoveryStrategyClassConstructor.newInstance(discoveryConfig);
34 |
35 | } catch (Exception e) {
36 | throw Exceptions.propagate(e);
37 | }
38 | }
39 |
40 | Mono extends Collection> discoverNodes();
41 | }
42 |
--------------------------------------------------------------------------------
/proteus-discovery/src/main/java/io/netifi/proteus/discovery/StaticListDiscoveryStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.discovery;
17 |
18 | import io.netifi.proteus.common.net.HostAndPort;
19 | import java.util.Collection;
20 | import org.slf4j.Logger;
21 | import org.slf4j.LoggerFactory;
22 | import reactor.core.publisher.Flux;
23 | import reactor.core.publisher.Mono;
24 |
25 | public class StaticListDiscoveryStrategy implements DiscoveryStrategy {
26 | private static final Logger logger = LoggerFactory.getLogger(StaticListDiscoveryStrategy.class);
27 |
28 | private final StaticListDiscoveryConfig staticListDiscoveryConfig;
29 | private Mono extends Collection> nodes;
30 |
31 | public StaticListDiscoveryStrategy(StaticListDiscoveryConfig staticListDiscoveryConfig) {
32 | this.staticListDiscoveryConfig = staticListDiscoveryConfig;
33 | this.nodes =
34 | Mono.defer(
35 | () -> {
36 | if (this.staticListDiscoveryConfig.getAddresses().isEmpty()) {
37 | return Mono.empty();
38 | } else {
39 | logger.debug(
40 | "seeding cluster with {}", this.staticListDiscoveryConfig.getAddresses());
41 | return Flux.fromIterable(this.staticListDiscoveryConfig.getAddresses())
42 | .map(
43 | hostPortString ->
44 | HostAndPort.fromString(hostPortString)
45 | .withDefaultPort(this.staticListDiscoveryConfig.getPort()))
46 | .collectList();
47 | }
48 | })
49 | .cache();
50 | }
51 |
52 | @Override
53 | public Mono extends Collection> discoverNodes() {
54 | return nodes;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/proteus-frames/build.gradle:
--------------------------------------------------------------------------------
1 | description = 'Netifi Proteus Frames'
2 |
3 | dependencies {
4 | implementation project(':proteus-common')
5 | implementation 'io.rsocket:rsocket-core'
6 |
7 | compileOnly 'javax.inject:javax.inject'
8 |
9 | testCompile 'junit:junit'
10 | testCompile 'javax.inject:javax.inject'
11 | testCompile 'io.projectreactor:reactor-test'
12 | testCompile "com.google.protobuf:protobuf-java"
13 | testCompile 'org.hdrhistogram:HdrHistogram'
14 | testCompile 'org.apache.logging.log4j:log4j-api'
15 | testCompile 'org.apache.logging.log4j:log4j-core'
16 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
17 | testCompile 'io.rsocket:rsocket-transport-netty'
18 | testCompile 'io.rsocket:rsocket-transport-local'
19 | testCompile 'org.mockito:mockito-core'
20 | }
--------------------------------------------------------------------------------
/proteus-frames/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-frames/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.netty:netty-buffer:4.1.31.Final
5 | io.netty:netty-common:4.1.31.Final
6 | io.projectreactor:reactor-core:3.2.6.RELEASE
7 | io.rsocket:rsocket-core:0.11.17.2
8 | javax.inject:javax.inject:1
9 | org.reactivestreams:reactive-streams:1.0.2
10 |
--------------------------------------------------------------------------------
/proteus-frames/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-frames/gradle/dependency-locks/testAnnotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-frames/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-frames/gradle/dependency-locks/testRuntimeClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-frames/src/main/java/io/netifi/proteus/frames/AuthorizationWrapperFlyweight.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netty.buffer.ByteBuf;
19 | import io.netty.buffer.ByteBufAllocator;
20 |
21 | public class AuthorizationWrapperFlyweight {
22 |
23 | public static ByteBuf encode(ByteBufAllocator allocator, long accessKey, ByteBuf innerFrame) {
24 |
25 | ByteBuf byteBuf =
26 | FrameHeaderFlyweight.encodeFrameHeader(allocator, FrameType.AUTHORIZATION_WRAPPER);
27 |
28 | byteBuf.writeLong(accessKey).writeBytes(innerFrame);
29 |
30 | return byteBuf;
31 | }
32 |
33 | public static long accessKey(ByteBuf byteBuf) {
34 | int offset = FrameHeaderFlyweight.BYTES;
35 |
36 | return byteBuf.getLong(offset);
37 | }
38 |
39 | public static ByteBuf innerFrame(ByteBuf byteBuf) {
40 | int offset = FrameHeaderFlyweight.BYTES;
41 | offset += Long.BYTES;
42 |
43 | byteBuf.markReaderIndex();
44 | byteBuf.skipBytes(offset);
45 | ByteBuf slice = byteBuf.slice();
46 | byteBuf.resetReaderIndex();
47 | return slice;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/proteus-frames/src/main/java/io/netifi/proteus/frames/FrameHeaderFlyweight.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netty.buffer.ByteBuf;
19 | import io.netty.buffer.ByteBufAllocator;
20 |
21 | public class FrameHeaderFlyweight {
22 |
23 | // Protocol Version
24 | public static final short MAJOR_VERSION = 0;
25 | public static final short MINOR_VERSION = 1;
26 |
27 | private static final int MAJOR_VERSION_SIZE = Short.BYTES;
28 | private static final int MINOR_VERSION_SIZE = Short.BYTES;
29 | private static final int FRAME_TYPE_SIZE = Short.BYTES;
30 |
31 | public static final int BYTES = MAJOR_VERSION_SIZE + MINOR_VERSION_SIZE + FRAME_TYPE_SIZE;
32 |
33 | private FrameHeaderFlyweight() {}
34 |
35 | public static ByteBuf encodeFrameHeader(
36 | final ByteBufAllocator allocator,
37 | final short majorVersion,
38 | final short minorVersion,
39 | final FrameType type) {
40 | return allocator
41 | .buffer()
42 | .writeShort(majorVersion)
43 | .writeShort(minorVersion)
44 | .writeShort(type.getEncodedType());
45 | }
46 |
47 | public static ByteBuf encodeFrameHeader(final ByteBufAllocator allocator, final FrameType type) {
48 | return encodeFrameHeader(allocator, MAJOR_VERSION, MINOR_VERSION, type);
49 | }
50 |
51 | public static short majorVersion(ByteBuf byteBuf) {
52 | return byteBuf.getShort(0);
53 | }
54 |
55 | public static short minorVersion(ByteBuf byteBuf) {
56 | return byteBuf.getShort(MAJOR_VERSION_SIZE);
57 | }
58 |
59 | public static FrameType frameType(ByteBuf byteBuf) {
60 | short frameTypeId = byteBuf.getShort(MAJOR_VERSION_SIZE + MINOR_VERSION_SIZE);
61 | return FrameType.from(frameTypeId);
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/proteus-frames/src/main/java/io/netifi/proteus/frames/FrameType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | /** */
19 | public enum FrameType {
20 | UNDEFINED(0x00),
21 | BROKER_SETUP(0x01),
22 | DESTINATION_SETUP(0x02),
23 | GROUP(0x03),
24 | BROADCAST(0x04),
25 | SHARD(0x05),
26 | AUTHORIZATION_WRAPPER(0x06);
27 |
28 | private static FrameType[] typesById;
29 |
30 | private final int id;
31 |
32 | /** Index types by id for indexed lookup. */
33 | static {
34 | int max = 0;
35 |
36 | for (FrameType t : values()) {
37 | max = Math.max(t.id, max);
38 | }
39 |
40 | typesById = new FrameType[max + 1];
41 |
42 | for (FrameType t : values()) {
43 | typesById[t.id] = t;
44 | }
45 | }
46 |
47 | FrameType(int id) {
48 | this.id = id;
49 | }
50 |
51 | public int getEncodedType() {
52 | return id;
53 | }
54 |
55 | public static FrameType from(int id) {
56 | return typesById[id];
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/proteus-frames/src/test/java/io/netifi/proteus/frames/BroadcastFlyweightTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netifi.proteus.common.tags.Tags;
19 | import io.netty.buffer.ByteBuf;
20 | import io.netty.buffer.ByteBufAllocator;
21 | import io.netty.buffer.ByteBufUtil;
22 | import io.netty.buffer.Unpooled;
23 | import org.junit.Assert;
24 | import org.junit.Test;
25 |
26 | public class BroadcastFlyweightTest {
27 |
28 | @Test
29 | public void testEncoding() {
30 | ByteBuf metadata = Unpooled.wrappedBuffer("metadata".getBytes());
31 | Tags tags = Tags.of("tag", "tag");
32 | ByteBuf byteBuf = BroadcastFlyweight.encode(ByteBufAllocator.DEFAULT, "group", metadata, tags);
33 |
34 | Assert.assertEquals("group", BroadcastFlyweight.group(byteBuf));
35 | System.out.println(ByteBufUtil.prettyHexDump(BroadcastFlyweight.metadata(byteBuf)));
36 | Assert.assertTrue(ByteBufUtil.equals(metadata, BroadcastFlyweight.metadata(byteBuf)));
37 | Assert.assertEquals(tags, BroadcastFlyweight.tags(byteBuf));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/proteus-frames/src/test/java/io/netifi/proteus/frames/BrokerSetupFlyweightTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netty.buffer.ByteBuf;
19 | import io.netty.buffer.ByteBufAllocator;
20 | import io.netty.buffer.ByteBufUtil;
21 | import io.netty.buffer.Unpooled;
22 | import org.junit.Assert;
23 | import org.junit.Test;
24 |
25 | public class BrokerSetupFlyweightTest {
26 | @Test
27 | public void testEncoding() {
28 | ByteBuf authToken = Unpooled.wrappedBuffer("access token".getBytes());
29 |
30 | ByteBuf byteBuf =
31 | BrokerSetupFlyweight.encode(
32 | ByteBufAllocator.DEFAULT, "brokerId", "clusterId", Long.MAX_VALUE, authToken);
33 |
34 | Assert.assertEquals("brokerId", BrokerSetupFlyweight.brokerId(byteBuf));
35 | Assert.assertEquals("clusterId", BrokerSetupFlyweight.clusterId(byteBuf));
36 | Assert.assertEquals(Long.MAX_VALUE, BrokerSetupFlyweight.accessKey(byteBuf));
37 | authToken.resetReaderIndex();
38 | Assert.assertTrue(ByteBufUtil.equals(authToken, BrokerSetupFlyweight.accessToken(byteBuf)));
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/proteus-frames/src/test/java/io/netifi/proteus/frames/FrameHeaderFlyweightTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netty.buffer.ByteBuf;
19 | import io.netty.buffer.ByteBufAllocator;
20 | import org.junit.Assert;
21 | import org.junit.Test;
22 |
23 | public class FrameHeaderFlyweightTest {
24 | @Test
25 | public void testEncoding() {
26 | short major = 50;
27 | short minor = 50;
28 | ByteBuf byteBuf =
29 | FrameHeaderFlyweight.encodeFrameHeader(
30 | ByteBufAllocator.DEFAULT, major, minor, FrameType.DESTINATION_SETUP);
31 |
32 | Assert.assertEquals(major, FrameHeaderFlyweight.majorVersion(byteBuf));
33 | Assert.assertEquals(minor, FrameHeaderFlyweight.minorVersion(byteBuf));
34 | Assert.assertEquals(FrameType.DESTINATION_SETUP, FrameHeaderFlyweight.frameType(byteBuf));
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/proteus-frames/src/test/java/io/netifi/proteus/frames/GroupFlyweightTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netifi.proteus.common.tags.Tags;
19 | import io.netty.buffer.ByteBuf;
20 | import io.netty.buffer.ByteBufAllocator;
21 | import io.netty.buffer.ByteBufUtil;
22 | import io.netty.buffer.Unpooled;
23 | import org.junit.Assert;
24 | import org.junit.Test;
25 |
26 | public class GroupFlyweightTest {
27 | @Test
28 | public void testEncoding() {
29 |
30 | ByteBuf metadata = Unpooled.wrappedBuffer("metadata".getBytes());
31 | Tags tags = Tags.of("com.netifi.destination", "toDestination");
32 | ByteBuf byteBuf = GroupFlyweight.encode(ByteBufAllocator.DEFAULT, "group", metadata, tags);
33 |
34 | System.out.println(ByteBufUtil.prettyHexDump(GroupFlyweight.metadata(byteBuf)));
35 | Assert.assertEquals("group", GroupFlyweight.group(byteBuf));
36 | Assert.assertTrue(ByteBufUtil.equals(metadata, GroupFlyweight.metadata(byteBuf)));
37 | Assert.assertEquals(tags, GroupFlyweight.tags(byteBuf));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/proteus-frames/src/test/java/io/netifi/proteus/frames/ShardFlyweightTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.frames;
17 |
18 | import io.netifi.proteus.common.tags.Tags;
19 | import io.netty.buffer.ByteBuf;
20 | import io.netty.buffer.ByteBufAllocator;
21 | import io.netty.buffer.ByteBufUtil;
22 | import io.netty.buffer.Unpooled;
23 | import org.junit.Assert;
24 | import org.junit.Test;
25 |
26 | public class ShardFlyweightTest {
27 | @Test
28 | public void testEncoding() {
29 | ByteBuf metadata = Unpooled.wrappedBuffer("metadata".getBytes());
30 | ByteBuf shardKey = Unpooled.wrappedBuffer("shardKey".getBytes());
31 | Tags tags = Tags.of("tag", "tag");
32 | ByteBuf byteBuf =
33 | ShardFlyweight.encode(ByteBufAllocator.DEFAULT, "group", metadata, shardKey, tags);
34 |
35 | Assert.assertEquals("group", ShardFlyweight.group(byteBuf));
36 | System.out.println(ByteBufUtil.prettyHexDump(ShardFlyweight.metadata(byteBuf)));
37 | Assert.assertTrue(ByteBufUtil.equals(metadata, ShardFlyweight.metadata(byteBuf)));
38 | Assert.assertTrue(ByteBufUtil.equals(shardKey, ShardFlyweight.shardKey(byteBuf)));
39 | Assert.assertEquals(tags, ShardFlyweight.tags(byteBuf));
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.google.protobuf'
2 |
3 | description = 'Netifi Proteus Prometheus Integration'
4 |
5 | dependencies {
6 | compile project (':proteus-client')
7 | compile 'io.rsocket.rpc:rsocket-rpc-protobuf'
8 | protobuf "io.rsocket.rpc:rsocket-rpc-metrics-idl"
9 | compile 'io.micrometer:micrometer-registry-influx'
10 |
11 | compile 'com.google.guava:guava'
12 |
13 | testCompile 'org.apache.logging.log4j:log4j-api'
14 | testCompile 'org.apache.logging.log4j:log4j-core'
15 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
16 | }
17 |
18 | protobuf {
19 | generatedFilesBaseDir = "${projectDir}/src/generated"
20 |
21 | protoc {
22 | artifact = "com.google.protobuf:protoc"
23 | }
24 | plugins {
25 | rsocketRpc {
26 | artifact = "io.rsocket.rpc:rsocket-rpc-protobuf"
27 | }
28 | }
29 | generateProtoTasks {
30 | all().each { task ->
31 | // Recompile protos when build.gradle has been changed, because
32 | // it's possible the version of protoc has been changed.
33 | task.inputs.file "${rootProject.projectDir}/build.gradle"
34 | task.plugins {
35 | rsocketRpc {}
36 | }
37 | }
38 | }
39 | }
40 |
41 | clean {
42 | delete protobuf.generatedFilesBaseDir
43 | }
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/compile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.guava:failureaccess:1.0.1
7 | com.google.guava:guava:27.0.1-jre
8 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
9 | com.google.j2objc:j2objc-annotations:1.1
10 | com.google.protobuf:protobuf-java:3.6.1
11 | com.typesafe:config:1.3.3
12 | io.micrometer:micrometer-core:1.0.6
13 | io.micrometer:micrometer-registry-influx:1.0.6
14 | io.netty:netty-buffer:4.1.31.Final
15 | io.netty:netty-codec-http2:4.1.31.Final
16 | io.netty:netty-codec-http:4.1.31.Final
17 | io.netty:netty-codec-socks:4.1.31.Final
18 | io.netty:netty-codec:4.1.31.Final
19 | io.netty:netty-common:4.1.31.Final
20 | io.netty:netty-handler-proxy:4.1.31.Final
21 | io.netty:netty-handler:4.1.31.Final
22 | io.netty:netty-resolver:4.1.31.Final
23 | io.netty:netty-tcnative:2.0.18.Final
24 | io.netty:netty-transport-native-epoll:4.1.31.Final
25 | io.netty:netty-transport-native-unix-common:4.1.31.Final
26 | io.netty:netty-transport:4.1.31.Final
27 | io.opentracing:opentracing-api:0.31.0
28 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
29 | io.projectreactor:reactor-core:3.2.6.RELEASE
30 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
31 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
32 | io.rsocket:rsocket-core:0.11.17.2
33 | io.rsocket:rsocket-transport-netty:0.11.17.2
34 | javax.annotation:javax.annotation-api:1.3.2
35 | javax.inject:javax.inject:1
36 | org.checkerframework:checker-qual:2.5.2
37 | org.codehaus.mojo:animal-sniffer-annotations:1.17
38 | org.hdrhistogram:HdrHistogram:2.1.10
39 | org.latencyutils:LatencyUtils:2.0.3
40 | org.reactivestreams:reactive-streams:1.0.2
41 | org.slf4j:slf4j-api:1.7.25
42 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.guava:failureaccess:1.0.1
7 | com.google.guava:guava:27.0.1-jre
8 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
9 | com.google.j2objc:j2objc-annotations:1.1
10 | com.google.protobuf:protobuf-java:3.6.1
11 | com.typesafe:config:1.3.3
12 | io.micrometer:micrometer-core:1.0.6
13 | io.micrometer:micrometer-registry-influx:1.0.6
14 | io.netty:netty-buffer:4.1.31.Final
15 | io.netty:netty-codec-http2:4.1.31.Final
16 | io.netty:netty-codec-http:4.1.31.Final
17 | io.netty:netty-codec-socks:4.1.31.Final
18 | io.netty:netty-codec:4.1.31.Final
19 | io.netty:netty-common:4.1.31.Final
20 | io.netty:netty-handler-proxy:4.1.31.Final
21 | io.netty:netty-handler:4.1.31.Final
22 | io.netty:netty-resolver:4.1.31.Final
23 | io.netty:netty-tcnative:2.0.18.Final
24 | io.netty:netty-transport-native-epoll:4.1.31.Final
25 | io.netty:netty-transport-native-unix-common:4.1.31.Final
26 | io.netty:netty-transport:4.1.31.Final
27 | io.opentracing:opentracing-api:0.31.0
28 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
29 | io.projectreactor:reactor-core:3.2.6.RELEASE
30 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
31 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
32 | io.rsocket:rsocket-core:0.11.17.2
33 | io.rsocket:rsocket-transport-netty:0.11.17.2
34 | javax.annotation:javax.annotation-api:1.3.2
35 | javax.inject:javax.inject:1
36 | org.checkerframework:checker-qual:2.5.2
37 | org.codehaus.mojo:animal-sniffer-annotations:1.17
38 | org.hdrhistogram:HdrHistogram:2.1.10
39 | org.latencyutils:LatencyUtils:2.0.3
40 | org.reactivestreams:reactive-streams:1.0.2
41 | org.slf4j:slf4j-api:1.7.25
42 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/protobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-metrics-idl:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/protobufToolsLocator_protoc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protoc:3.6.1
5 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/protobufToolsLocator_rsocketRpc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/testCompile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.guava:failureaccess:1.0.1
7 | com.google.guava:guava:27.0.1-jre
8 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
9 | com.google.j2objc:j2objc-annotations:1.1
10 | com.google.protobuf:protobuf-java:3.6.1
11 | com.typesafe:config:1.3.3
12 | io.micrometer:micrometer-core:1.0.6
13 | io.micrometer:micrometer-registry-influx:1.0.6
14 | io.netty:netty-buffer:4.1.31.Final
15 | io.netty:netty-codec-http2:4.1.31.Final
16 | io.netty:netty-codec-http:4.1.31.Final
17 | io.netty:netty-codec-socks:4.1.31.Final
18 | io.netty:netty-codec:4.1.31.Final
19 | io.netty:netty-common:4.1.31.Final
20 | io.netty:netty-handler-proxy:4.1.31.Final
21 | io.netty:netty-handler:4.1.31.Final
22 | io.netty:netty-resolver:4.1.31.Final
23 | io.netty:netty-tcnative:2.0.18.Final
24 | io.netty:netty-transport-native-epoll:4.1.31.Final
25 | io.netty:netty-transport-native-unix-common:4.1.31.Final
26 | io.netty:netty-transport:4.1.31.Final
27 | io.opentracing:opentracing-api:0.31.0
28 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
29 | io.projectreactor:reactor-core:3.2.6.RELEASE
30 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
31 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
32 | io.rsocket:rsocket-core:0.11.17.2
33 | io.rsocket:rsocket-transport-netty:0.11.17.2
34 | javax.annotation:javax.annotation-api:1.3.2
35 | javax.inject:javax.inject:1
36 | org.apache.logging.log4j:log4j-api:2.11.2
37 | org.apache.logging.log4j:log4j-core:2.11.2
38 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
39 | org.checkerframework:checker-qual:2.5.2
40 | org.codehaus.mojo:animal-sniffer-annotations:1.17
41 | org.hdrhistogram:HdrHistogram:2.1.10
42 | org.latencyutils:LatencyUtils:2.0.3
43 | org.reactivestreams:reactive-streams:1.0.2
44 | org.slf4j:slf4j-api:1.7.25
45 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.guava:failureaccess:1.0.1
7 | com.google.guava:guava:27.0.1-jre
8 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
9 | com.google.j2objc:j2objc-annotations:1.1
10 | com.google.protobuf:protobuf-java:3.6.1
11 | com.typesafe:config:1.3.3
12 | io.micrometer:micrometer-core:1.0.6
13 | io.micrometer:micrometer-registry-influx:1.0.6
14 | io.netty:netty-buffer:4.1.31.Final
15 | io.netty:netty-codec-http2:4.1.31.Final
16 | io.netty:netty-codec-http:4.1.31.Final
17 | io.netty:netty-codec-socks:4.1.31.Final
18 | io.netty:netty-codec:4.1.31.Final
19 | io.netty:netty-common:4.1.31.Final
20 | io.netty:netty-handler-proxy:4.1.31.Final
21 | io.netty:netty-handler:4.1.31.Final
22 | io.netty:netty-resolver:4.1.31.Final
23 | io.netty:netty-tcnative:2.0.18.Final
24 | io.netty:netty-transport-native-epoll:4.1.31.Final
25 | io.netty:netty-transport-native-unix-common:4.1.31.Final
26 | io.netty:netty-transport:4.1.31.Final
27 | io.opentracing:opentracing-api:0.31.0
28 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
29 | io.projectreactor:reactor-core:3.2.6.RELEASE
30 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
31 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
32 | io.rsocket:rsocket-core:0.11.17.2
33 | io.rsocket:rsocket-transport-netty:0.11.17.2
34 | javax.annotation:javax.annotation-api:1.3.2
35 | javax.inject:javax.inject:1
36 | org.apache.logging.log4j:log4j-api:2.11.2
37 | org.apache.logging.log4j:log4j-core:2.11.2
38 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
39 | org.checkerframework:checker-qual:2.5.2
40 | org.codehaus.mojo:animal-sniffer-annotations:1.17
41 | org.hdrhistogram:HdrHistogram:2.1.10
42 | org.latencyutils:LatencyUtils:2.0.3
43 | org.reactivestreams:reactive-streams:1.0.2
44 | org.slf4j:slf4j-api:1.7.25
45 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/gradle/dependency-locks/testProtobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-metrics-influx/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.google.protobuf'
2 |
3 | dependencies {
4 | compile project (':proteus-client')
5 | compile "io.rsocket.rpc:rsocket-rpc-protobuf"
6 | protobuf "io.rsocket.rpc:rsocket-rpc-metrics-idl"
7 | compile 'io.micrometer:micrometer-registry-atlas'
8 |
9 | compileOnly 'javax.inject:javax.inject'
10 |
11 | testCompile 'junit:junit'
12 | testCompile 'javax.inject:javax.inject'
13 | testCompile 'io.projectreactor:reactor-test'
14 | testCompile "com.google.protobuf:protobuf-java"
15 | testCompile 'org.hdrhistogram:HdrHistogram'
16 | testCompile 'org.apache.logging.log4j:log4j-api'
17 | testCompile 'org.apache.logging.log4j:log4j-core'
18 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
19 | testCompile 'io.rsocket:rsocket-transport-netty'
20 | testCompile 'io.rsocket:rsocket-transport-local'
21 | testCompile 'org.mockito:mockito-core'
22 | }
23 |
24 | googleJavaFormat {
25 | exclude 'src/*'
26 | }
27 |
28 | protobuf {
29 | generatedFilesBaseDir = "${projectDir}/src/generated"
30 |
31 | protoc {
32 | artifact = "com.google.protobuf:protoc"
33 | }
34 | plugins {
35 | rsocketRpc {
36 | artifact = "io.rsocket.rpc:rsocket-rpc-protobuf"
37 | }
38 | }
39 | generateProtoTasks {
40 | all().each { task ->
41 | // Recompile protos when build.gradle has been changed, because
42 | // it's possible the version of protoc has been changed.
43 | task.inputs.file "${rootProject.projectDir}/build.gradle"
44 | task.plugins {
45 | rsocketRpc {}
46 | }
47 | }
48 | }
49 | }
50 |
51 | clean {
52 | delete protobuf.generatedFilesBaseDir
53 | }
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/compile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.9.8
8 | com.google.protobuf:protobuf-java:3.6.1
9 | com.netflix.spectator:spectator-api:0.61.0
10 | com.netflix.spectator:spectator-ext-sandbox:0.61.0
11 | com.netflix.spectator:spectator-reg-atlas:0.61.0
12 | com.typesafe:config:1.3.3
13 | io.micrometer:micrometer-core:1.0.6
14 | io.micrometer:micrometer-registry-atlas:1.0.6
15 | io.netty:netty-buffer:4.1.31.Final
16 | io.netty:netty-codec-http2:4.1.31.Final
17 | io.netty:netty-codec-http:4.1.31.Final
18 | io.netty:netty-codec-socks:4.1.31.Final
19 | io.netty:netty-codec:4.1.31.Final
20 | io.netty:netty-common:4.1.31.Final
21 | io.netty:netty-handler-proxy:4.1.31.Final
22 | io.netty:netty-handler:4.1.31.Final
23 | io.netty:netty-resolver:4.1.31.Final
24 | io.netty:netty-tcnative:2.0.18.Final
25 | io.netty:netty-transport-native-epoll:4.1.31.Final
26 | io.netty:netty-transport-native-unix-common:4.1.31.Final
27 | io.netty:netty-transport:4.1.31.Final
28 | io.opentracing:opentracing-api:0.31.0
29 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
30 | io.projectreactor:reactor-core:3.2.6.RELEASE
31 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
32 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
33 | io.rsocket:rsocket-core:0.11.17.2
34 | io.rsocket:rsocket-transport-netty:0.11.17.2
35 | javax.annotation:javax.annotation-api:1.3.2
36 | javax.inject:javax.inject:1
37 | org.hdrhistogram:HdrHistogram:2.1.10
38 | org.latencyutils:LatencyUtils:2.0.3
39 | org.reactivestreams:reactive-streams:1.0.2
40 | org.slf4j:slf4j-api:1.7.25
41 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.9.8
8 | com.google.protobuf:protobuf-java:3.6.1
9 | com.netflix.spectator:spectator-api:0.61.0
10 | com.netflix.spectator:spectator-ext-sandbox:0.61.0
11 | com.netflix.spectator:spectator-reg-atlas:0.61.0
12 | com.typesafe:config:1.3.3
13 | io.micrometer:micrometer-core:1.0.6
14 | io.micrometer:micrometer-registry-atlas:1.0.6
15 | io.netty:netty-buffer:4.1.31.Final
16 | io.netty:netty-codec-http2:4.1.31.Final
17 | io.netty:netty-codec-http:4.1.31.Final
18 | io.netty:netty-codec-socks:4.1.31.Final
19 | io.netty:netty-codec:4.1.31.Final
20 | io.netty:netty-common:4.1.31.Final
21 | io.netty:netty-handler-proxy:4.1.31.Final
22 | io.netty:netty-handler:4.1.31.Final
23 | io.netty:netty-resolver:4.1.31.Final
24 | io.netty:netty-tcnative:2.0.18.Final
25 | io.netty:netty-transport-native-epoll:4.1.31.Final
26 | io.netty:netty-transport-native-unix-common:4.1.31.Final
27 | io.netty:netty-transport:4.1.31.Final
28 | io.opentracing:opentracing-api:0.31.0
29 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
30 | io.projectreactor:reactor-core:3.2.6.RELEASE
31 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
32 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
33 | io.rsocket:rsocket-core:0.11.17.2
34 | io.rsocket:rsocket-transport-netty:0.11.17.2
35 | javax.annotation:javax.annotation-api:1.3.2
36 | javax.inject:javax.inject:1
37 | org.hdrhistogram:HdrHistogram:2.1.10
38 | org.latencyutils:LatencyUtils:2.0.3
39 | org.reactivestreams:reactive-streams:1.0.2
40 | org.slf4j:slf4j-api:1.7.25
41 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/protobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-metrics-idl:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/protobufToolsLocator_protoc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protoc:3.6.1
5 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/protobufToolsLocator_rsocketRpc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/testCompile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.9.8
8 | com.google.protobuf:protobuf-java:3.6.1
9 | com.netflix.spectator:spectator-api:0.61.0
10 | com.netflix.spectator:spectator-ext-sandbox:0.61.0
11 | com.netflix.spectator:spectator-reg-atlas:0.61.0
12 | com.typesafe:config:1.3.3
13 | io.micrometer:micrometer-core:1.0.6
14 | io.micrometer:micrometer-registry-atlas:1.0.6
15 | io.netty:netty-buffer:4.1.31.Final
16 | io.netty:netty-codec-http2:4.1.31.Final
17 | io.netty:netty-codec-http:4.1.31.Final
18 | io.netty:netty-codec-socks:4.1.31.Final
19 | io.netty:netty-codec:4.1.31.Final
20 | io.netty:netty-common:4.1.31.Final
21 | io.netty:netty-handler-proxy:4.1.31.Final
22 | io.netty:netty-handler:4.1.31.Final
23 | io.netty:netty-resolver:4.1.31.Final
24 | io.netty:netty-tcnative:2.0.18.Final
25 | io.netty:netty-transport-native-epoll:4.1.31.Final
26 | io.netty:netty-transport-native-unix-common:4.1.31.Final
27 | io.netty:netty-transport:4.1.31.Final
28 | io.opentracing:opentracing-api:0.31.0
29 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
30 | io.projectreactor:reactor-core:3.2.6.RELEASE
31 | io.projectreactor:reactor-test:3.2.6.RELEASE
32 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
33 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
34 | io.rsocket:rsocket-core:0.11.17.2
35 | io.rsocket:rsocket-transport-local:0.11.17.2
36 | io.rsocket:rsocket-transport-netty:0.11.17.2
37 | javax.annotation:javax.annotation-api:1.3.2
38 | javax.inject:javax.inject:1
39 | junit:junit:4.12
40 | net.bytebuddy:byte-buddy-agent:1.9.7
41 | net.bytebuddy:byte-buddy:1.9.7
42 | org.apache.logging.log4j:log4j-api:2.11.2
43 | org.apache.logging.log4j:log4j-core:2.11.2
44 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
45 | org.hamcrest:hamcrest-core:1.3
46 | org.hdrhistogram:HdrHistogram:2.1.10
47 | org.latencyutils:LatencyUtils:2.0.3
48 | org.mockito:mockito-core:2.25.0
49 | org.objenesis:objenesis:2.6
50 | org.reactivestreams:reactive-streams:1.0.2
51 | org.slf4j:slf4j-api:1.7.25
52 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.9.8
8 | com.google.protobuf:protobuf-java:3.6.1
9 | com.netflix.spectator:spectator-api:0.61.0
10 | com.netflix.spectator:spectator-ext-sandbox:0.61.0
11 | com.netflix.spectator:spectator-reg-atlas:0.61.0
12 | com.typesafe:config:1.3.3
13 | io.micrometer:micrometer-core:1.0.6
14 | io.micrometer:micrometer-registry-atlas:1.0.6
15 | io.netty:netty-buffer:4.1.31.Final
16 | io.netty:netty-codec-http2:4.1.31.Final
17 | io.netty:netty-codec-http:4.1.31.Final
18 | io.netty:netty-codec-socks:4.1.31.Final
19 | io.netty:netty-codec:4.1.31.Final
20 | io.netty:netty-common:4.1.31.Final
21 | io.netty:netty-handler-proxy:4.1.31.Final
22 | io.netty:netty-handler:4.1.31.Final
23 | io.netty:netty-resolver:4.1.31.Final
24 | io.netty:netty-tcnative:2.0.18.Final
25 | io.netty:netty-transport-native-epoll:4.1.31.Final
26 | io.netty:netty-transport-native-unix-common:4.1.31.Final
27 | io.netty:netty-transport:4.1.31.Final
28 | io.opentracing:opentracing-api:0.31.0
29 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
30 | io.projectreactor:reactor-core:3.2.6.RELEASE
31 | io.projectreactor:reactor-test:3.2.6.RELEASE
32 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
33 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
34 | io.rsocket:rsocket-core:0.11.17.2
35 | io.rsocket:rsocket-transport-local:0.11.17.2
36 | io.rsocket:rsocket-transport-netty:0.11.17.2
37 | javax.annotation:javax.annotation-api:1.3.2
38 | javax.inject:javax.inject:1
39 | junit:junit:4.12
40 | net.bytebuddy:byte-buddy-agent:1.9.7
41 | net.bytebuddy:byte-buddy:1.9.7
42 | org.apache.logging.log4j:log4j-api:2.11.2
43 | org.apache.logging.log4j:log4j-core:2.11.2
44 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
45 | org.hamcrest:hamcrest-core:1.3
46 | org.hdrhistogram:HdrHistogram:2.1.10
47 | org.latencyutils:LatencyUtils:2.0.3
48 | org.mockito:mockito-core:2.25.0
49 | org.objenesis:objenesis:2.6
50 | org.reactivestreams:reactive-streams:1.0.2
51 | org.slf4j:slf4j-api:1.7.25
52 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/gradle/dependency-locks/testProtobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/src/main/java/io/netifi/proteus/micrometer/ProteusOperatingSystemMetrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.micrometer;
17 |
18 | import io.micrometer.core.instrument.MeterRegistry;
19 | import io.micrometer.core.instrument.Tag;
20 | import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics;
21 | import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics;
22 | import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
23 | import io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics;
24 | import io.micrometer.core.instrument.binder.system.FileDescriptorMetrics;
25 | import io.micrometer.core.instrument.binder.system.ProcessorMetrics;
26 | import io.micrometer.core.instrument.binder.system.UptimeMetrics;
27 |
28 | public class ProteusOperatingSystemMetrics {
29 | public ProteusOperatingSystemMetrics(MeterRegistry registry, Iterable tags) {
30 | new JvmMemoryMetrics(tags).bindTo(registry);
31 | new JvmGcMetrics(tags).bindTo(registry);
32 | new JvmThreadMetrics(tags).bindTo(registry);
33 | new ClassLoaderMetrics(tags).bindTo(registry);
34 | new ProcessorMetrics(tags).bindTo(registry);
35 | new UptimeMetrics(tags).bindTo(registry);
36 | new FileDescriptorMetrics(tags).bindTo(registry);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/proteus-metrics-micrometer/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.google.protobuf'
2 |
3 | description = 'Netifi Proteus Prometheus Integration'
4 |
5 | dependencies {
6 | compile project (':proteus-client')
7 | compile 'io.rsocket.rpc:rsocket-rpc-protobuf'
8 | protobuf "io.rsocket.rpc:rsocket-rpc-metrics-idl"
9 | compile 'io.micrometer:micrometer-registry-prometheus'
10 | compileOnly 'javax.inject:javax.inject'
11 |
12 | testCompile 'junit:junit'
13 | testCompile 'javax.inject:javax.inject'
14 | testCompile 'io.projectreactor:reactor-test'
15 | testCompile "com.google.protobuf:protobuf-java"
16 | testCompile 'org.hdrhistogram:HdrHistogram'
17 | testCompile 'org.apache.logging.log4j:log4j-api'
18 | testCompile 'org.apache.logging.log4j:log4j-core'
19 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
20 | testCompile 'io.rsocket:rsocket-transport-netty'
21 | testCompile 'io.rsocket:rsocket-transport-local'
22 | testCompile 'org.mockito:mockito-core'
23 |
24 | testCompile 'org.apache.logging.log4j:log4j-api'
25 | testCompile 'org.apache.logging.log4j:log4j-core'
26 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
27 | }
28 |
29 | protobuf {
30 | generatedFilesBaseDir = "${projectDir}/src/generated"
31 |
32 | protoc {
33 | artifact = "com.google.protobuf:protoc"
34 | }
35 | plugins {
36 | rsocketRpc {
37 | artifact = "io.rsocket.rpc:rsocket-rpc-protobuf"
38 | }
39 | }
40 | generateProtoTasks {
41 | all().each { task ->
42 | // Recompile protos when build.gradle has been changed, because
43 | // it's possible the version of protoc has been changed.
44 | task.inputs.file "${rootProject.projectDir}/build.gradle"
45 | task.plugins {
46 | rsocketRpc {}
47 | }
48 | }
49 | }
50 | }
51 |
52 | clean {
53 | delete protobuf.generatedFilesBaseDir
54 | }
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/compile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | com.typesafe:config:1.3.3
6 | io.micrometer:micrometer-core:1.0.6
7 | io.micrometer:micrometer-registry-prometheus:1.0.6
8 | io.netty:netty-buffer:4.1.31.Final
9 | io.netty:netty-codec-http2:4.1.31.Final
10 | io.netty:netty-codec-http:4.1.31.Final
11 | io.netty:netty-codec-socks:4.1.31.Final
12 | io.netty:netty-codec:4.1.31.Final
13 | io.netty:netty-common:4.1.31.Final
14 | io.netty:netty-handler-proxy:4.1.31.Final
15 | io.netty:netty-handler:4.1.31.Final
16 | io.netty:netty-resolver:4.1.31.Final
17 | io.netty:netty-tcnative:2.0.18.Final
18 | io.netty:netty-transport-native-epoll:4.1.31.Final
19 | io.netty:netty-transport-native-unix-common:4.1.31.Final
20 | io.netty:netty-transport:4.1.31.Final
21 | io.opentracing:opentracing-api:0.31.0
22 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
23 | io.projectreactor:reactor-core:3.2.6.RELEASE
24 | io.prometheus:simpleclient:0.4.0
25 | io.prometheus:simpleclient_common:0.4.0
26 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
27 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
28 | io.rsocket:rsocket-core:0.11.17.2
29 | io.rsocket:rsocket-transport-netty:0.11.17.2
30 | javax.annotation:javax.annotation-api:1.3.2
31 | javax.inject:javax.inject:1
32 | org.hdrhistogram:HdrHistogram:2.1.10
33 | org.latencyutils:LatencyUtils:2.0.3
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | com.typesafe:config:1.3.3
6 | io.micrometer:micrometer-core:1.0.6
7 | io.micrometer:micrometer-registry-prometheus:1.0.6
8 | io.netty:netty-buffer:4.1.31.Final
9 | io.netty:netty-codec-http2:4.1.31.Final
10 | io.netty:netty-codec-http:4.1.31.Final
11 | io.netty:netty-codec-socks:4.1.31.Final
12 | io.netty:netty-codec:4.1.31.Final
13 | io.netty:netty-common:4.1.31.Final
14 | io.netty:netty-handler-proxy:4.1.31.Final
15 | io.netty:netty-handler:4.1.31.Final
16 | io.netty:netty-resolver:4.1.31.Final
17 | io.netty:netty-tcnative:2.0.18.Final
18 | io.netty:netty-transport-native-epoll:4.1.31.Final
19 | io.netty:netty-transport-native-unix-common:4.1.31.Final
20 | io.netty:netty-transport:4.1.31.Final
21 | io.opentracing:opentracing-api:0.31.0
22 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
23 | io.projectreactor:reactor-core:3.2.6.RELEASE
24 | io.prometheus:simpleclient:0.4.0
25 | io.prometheus:simpleclient_common:0.4.0
26 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
27 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
28 | io.rsocket:rsocket-core:0.11.17.2
29 | io.rsocket:rsocket-transport-netty:0.11.17.2
30 | javax.annotation:javax.annotation-api:1.3.2
31 | javax.inject:javax.inject:1
32 | org.hdrhistogram:HdrHistogram:2.1.10
33 | org.latencyutils:LatencyUtils:2.0.3
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/protobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-metrics-idl:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/protobufToolsLocator_protoc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protoc:3.6.1
5 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/protobufToolsLocator_rsocketRpc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/testCompile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | com.typesafe:config:1.3.3
6 | io.micrometer:micrometer-core:1.0.6
7 | io.micrometer:micrometer-registry-prometheus:1.0.6
8 | io.netty:netty-buffer:4.1.31.Final
9 | io.netty:netty-codec-http2:4.1.31.Final
10 | io.netty:netty-codec-http:4.1.31.Final
11 | io.netty:netty-codec-socks:4.1.31.Final
12 | io.netty:netty-codec:4.1.31.Final
13 | io.netty:netty-common:4.1.31.Final
14 | io.netty:netty-handler-proxy:4.1.31.Final
15 | io.netty:netty-handler:4.1.31.Final
16 | io.netty:netty-resolver:4.1.31.Final
17 | io.netty:netty-tcnative:2.0.18.Final
18 | io.netty:netty-transport-native-epoll:4.1.31.Final
19 | io.netty:netty-transport-native-unix-common:4.1.31.Final
20 | io.netty:netty-transport:4.1.31.Final
21 | io.opentracing:opentracing-api:0.31.0
22 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
23 | io.projectreactor:reactor-core:3.2.6.RELEASE
24 | io.projectreactor:reactor-test:3.2.6.RELEASE
25 | io.prometheus:simpleclient:0.4.0
26 | io.prometheus:simpleclient_common:0.4.0
27 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
28 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
29 | io.rsocket:rsocket-core:0.11.17.2
30 | io.rsocket:rsocket-transport-local:0.11.17.2
31 | io.rsocket:rsocket-transport-netty:0.11.17.2
32 | javax.annotation:javax.annotation-api:1.3.2
33 | javax.inject:javax.inject:1
34 | junit:junit:4.12
35 | net.bytebuddy:byte-buddy-agent:1.9.7
36 | net.bytebuddy:byte-buddy:1.9.7
37 | org.apache.logging.log4j:log4j-api:2.11.2
38 | org.apache.logging.log4j:log4j-core:2.11.2
39 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
40 | org.hamcrest:hamcrest-core:1.3
41 | org.hdrhistogram:HdrHistogram:2.1.10
42 | org.latencyutils:LatencyUtils:2.0.3
43 | org.mockito:mockito-core:2.25.0
44 | org.objenesis:objenesis:2.6
45 | org.reactivestreams:reactive-streams:1.0.2
46 | org.slf4j:slf4j-api:1.7.25
47 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | com.typesafe:config:1.3.3
6 | io.micrometer:micrometer-core:1.0.6
7 | io.micrometer:micrometer-registry-prometheus:1.0.6
8 | io.netty:netty-buffer:4.1.31.Final
9 | io.netty:netty-codec-http2:4.1.31.Final
10 | io.netty:netty-codec-http:4.1.31.Final
11 | io.netty:netty-codec-socks:4.1.31.Final
12 | io.netty:netty-codec:4.1.31.Final
13 | io.netty:netty-common:4.1.31.Final
14 | io.netty:netty-handler-proxy:4.1.31.Final
15 | io.netty:netty-handler:4.1.31.Final
16 | io.netty:netty-resolver:4.1.31.Final
17 | io.netty:netty-tcnative:2.0.18.Final
18 | io.netty:netty-transport-native-epoll:4.1.31.Final
19 | io.netty:netty-transport-native-unix-common:4.1.31.Final
20 | io.netty:netty-transport:4.1.31.Final
21 | io.opentracing:opentracing-api:0.31.0
22 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
23 | io.projectreactor:reactor-core:3.2.6.RELEASE
24 | io.projectreactor:reactor-test:3.2.6.RELEASE
25 | io.prometheus:simpleclient:0.4.0
26 | io.prometheus:simpleclient_common:0.4.0
27 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
28 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
29 | io.rsocket:rsocket-core:0.11.17.2
30 | io.rsocket:rsocket-transport-local:0.11.17.2
31 | io.rsocket:rsocket-transport-netty:0.11.17.2
32 | javax.annotation:javax.annotation-api:1.3.2
33 | javax.inject:javax.inject:1
34 | junit:junit:4.12
35 | net.bytebuddy:byte-buddy-agent:1.9.7
36 | net.bytebuddy:byte-buddy:1.9.7
37 | org.apache.logging.log4j:log4j-api:2.11.2
38 | org.apache.logging.log4j:log4j-core:2.11.2
39 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
40 | org.hamcrest:hamcrest-core:1.3
41 | org.hdrhistogram:HdrHistogram:2.1.10
42 | org.latencyutils:LatencyUtils:2.0.3
43 | org.mockito:mockito-core:2.25.0
44 | org.objenesis:objenesis:2.6
45 | org.reactivestreams:reactive-streams:1.0.2
46 | org.slf4j:slf4j-api:1.7.25
47 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/gradle/dependency-locks/testProtobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-metrics-prometheus/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.google.protobuf'
2 |
3 | description = 'Netifi Proteus Tracing IDL'
4 |
5 | dependencies {
6 | protobuf "com.google.protobuf:protobuf-java"
7 | compileOnly 'javax.inject:javax.inject'
8 |
9 | testCompile 'junit:junit'
10 | testCompile 'javax.inject:javax.inject'
11 | testCompile 'io.projectreactor:reactor-test'
12 | testCompile "com.google.protobuf:protobuf-java"
13 | testCompile 'org.hdrhistogram:HdrHistogram'
14 | testCompile 'org.apache.logging.log4j:log4j-api'
15 | testCompile 'org.apache.logging.log4j:log4j-core'
16 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
17 | testCompile 'io.rsocket:rsocket-transport-netty'
18 | testCompile 'io.rsocket:rsocket-transport-local'
19 | testCompile 'org.mockito:mockito-core'
20 | }
21 |
22 | protobuf {
23 | protoc {
24 | artifact = "com.google.protobuf:protoc"
25 | }
26 | generateProtoTasks {
27 | all()*.enabled = false
28 | }
29 | }
--------------------------------------------------------------------------------
/proteus-tracing-idl/gradle/dependency-locks/compile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | javax.inject:javax.inject:1
5 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/gradle/dependency-locks/protobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/gradle/dependency-locks/testCompile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/gradle/dependency-locks/testProtobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-tracing-idl/src/main/proto/proteus/tracing.proto:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 The Proteus Authors
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | syntax = "proto3";
16 |
17 | package io.netifi.proteus.tracing;
18 |
19 | import "zipkin/proto3/zipkin.proto";
20 | import "google/protobuf/empty.proto";
21 |
22 | option java_package = "io.netifi.proteus.tracing";
23 | option java_outer_classname = "ProteusTracingServices";
24 | option java_multiple_files = true;
25 |
26 | message Ack {}
27 |
28 | message Trace {
29 | repeated zipkin.proto3.Span spans = 1;
30 | }
31 |
32 | message Traces {
33 | repeated Trace traces = 1;
34 | }
35 |
36 | message TracesRequest {
37 | int32 lookbackSeconds = 1;
38 | }
39 |
40 | service ProteusTracingService {
41 |
42 | rpc StreamSpans (stream zipkin.proto3.Span) returns (Ack) {}
43 | }
44 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.google.protobuf'
2 |
3 | description = 'Netifi Proteus Openzipkin Integration'
4 |
5 | dependencies {
6 | protobuf project (':proteus-tracing-idl')
7 | compile project (':proteus-client')
8 |
9 | compile "io.rsocket.rpc:rsocket-rpc-protobuf"
10 | compile 'io.projectreactor.addons:reactor-adapter'
11 | compile "com.google.protobuf:protobuf-java-util"
12 |
13 | compile 'io.opentracing:opentracing-api'
14 | compile 'io.opentracing.brave:brave-opentracing'
15 | compile 'com.fasterxml.jackson.core:jackson-databind'
16 | compile 'com.hubspot.jackson:jackson-datatype-protobuf'
17 | compileOnly 'javax.inject:javax.inject'
18 |
19 | testCompile 'junit:junit'
20 | testCompile 'javax.inject:javax.inject'
21 | testCompile 'io.projectreactor:reactor-test'
22 | testCompile "com.google.protobuf:protobuf-java"
23 | testCompile 'org.hdrhistogram:HdrHistogram'
24 | testCompile 'org.apache.logging.log4j:log4j-api'
25 | testCompile 'org.apache.logging.log4j:log4j-core'
26 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
27 | testCompile 'io.rsocket:rsocket-transport-netty'
28 | testCompile 'io.rsocket:rsocket-transport-local'
29 | testCompile 'org.mockito:mockito-core'
30 | }
31 |
32 | protobuf {
33 | generatedFilesBaseDir = "${projectDir}/src/generated"
34 |
35 | protoc {
36 | artifact = "com.google.protobuf:protoc"
37 | }
38 | plugins {
39 | rsocketRpc {
40 | artifact = "io.rsocket.rpc:rsocket-rpc-protobuf"
41 | }
42 | }
43 | generateProtoTasks {
44 | all().each { task ->
45 | // Recompile protos when build.gradle has been changed, because
46 | // it's possible the version of protoc has been changed.
47 | task.inputs.file "${rootProject.projectDir}/build.gradle"
48 | task.plugins {
49 | rsocketRpc {}
50 | }
51 | }
52 | }
53 | }
54 |
55 | clean {
56 | delete protobuf.generatedFilesBaseDir
57 | }
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/annotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/compile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.google.code.findbugs:annotations:3.0.1
8 | com.google.code.findbugs:jsr305:3.0.2
9 | com.google.code.gson:gson:2.7
10 | com.google.errorprone:error_prone_annotations:2.2.0
11 | com.google.guava:failureaccess:1.0.1
12 | com.google.guava:guava:27.0.1-jre
13 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
14 | com.google.j2objc:j2objc-annotations:1.1
15 | com.google.protobuf:protobuf-java-util:3.6.1
16 | com.google.protobuf:protobuf-java:3.6.1
17 | com.hubspot.jackson:jackson-datatype-protobuf:0.9.10-jackson2.9-proto3
18 | com.typesafe:config:1.3.3
19 | io.micrometer:micrometer-core:1.0.6
20 | io.netty:netty-buffer:4.1.31.Final
21 | io.netty:netty-codec-http2:4.1.31.Final
22 | io.netty:netty-codec-http:4.1.31.Final
23 | io.netty:netty-codec-socks:4.1.31.Final
24 | io.netty:netty-codec:4.1.31.Final
25 | io.netty:netty-common:4.1.31.Final
26 | io.netty:netty-handler-proxy:4.1.31.Final
27 | io.netty:netty-handler:4.1.31.Final
28 | io.netty:netty-resolver:4.1.31.Final
29 | io.netty:netty-tcnative:2.0.18.Final
30 | io.netty:netty-transport-native-epoll:4.1.31.Final
31 | io.netty:netty-transport-native-unix-common:4.1.31.Final
32 | io.netty:netty-transport:4.1.31.Final
33 | io.opentracing.brave:brave-opentracing:0.33.10
34 | io.opentracing:opentracing-api:0.31.0
35 | io.projectreactor.addons:reactor-adapter:3.2.2.RELEASE
36 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
37 | io.projectreactor:reactor-core:3.2.6.RELEASE
38 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
39 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
40 | io.rsocket:rsocket-core:0.11.17.2
41 | io.rsocket:rsocket-transport-netty:0.11.17.2
42 | io.zipkin.brave:brave:5.6.1
43 | io.zipkin.reporter2:zipkin-reporter:2.7.14
44 | io.zipkin.zipkin2:zipkin:2.12.0
45 | javax.annotation:javax.annotation-api:1.3.2
46 | javax.inject:javax.inject:1
47 | org.checkerframework:checker-qual:2.5.2
48 | org.codehaus.mojo:animal-sniffer-annotations:1.17
49 | org.hdrhistogram:HdrHistogram:2.1.10
50 | org.latencyutils:LatencyUtils:2.0.3
51 | org.reactivestreams:reactive-streams:1.0.2
52 | org.slf4j:slf4j-api:1.7.25
53 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.fasterxml.jackson.core:jackson-annotations:2.9.0
5 | com.fasterxml.jackson.core:jackson-core:2.9.8
6 | com.fasterxml.jackson.core:jackson-databind:2.9.8
7 | com.google.code.findbugs:annotations:3.0.1
8 | com.google.code.findbugs:jsr305:3.0.2
9 | com.google.code.gson:gson:2.7
10 | com.google.errorprone:error_prone_annotations:2.2.0
11 | com.google.guava:failureaccess:1.0.1
12 | com.google.guava:guava:27.0.1-jre
13 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
14 | com.google.j2objc:j2objc-annotations:1.1
15 | com.google.protobuf:protobuf-java-util:3.6.1
16 | com.google.protobuf:protobuf-java:3.6.1
17 | com.hubspot.jackson:jackson-datatype-protobuf:0.9.10-jackson2.9-proto3
18 | com.typesafe:config:1.3.3
19 | io.micrometer:micrometer-core:1.0.6
20 | io.netty:netty-buffer:4.1.31.Final
21 | io.netty:netty-codec-http2:4.1.31.Final
22 | io.netty:netty-codec-http:4.1.31.Final
23 | io.netty:netty-codec-socks:4.1.31.Final
24 | io.netty:netty-codec:4.1.31.Final
25 | io.netty:netty-common:4.1.31.Final
26 | io.netty:netty-handler-proxy:4.1.31.Final
27 | io.netty:netty-handler:4.1.31.Final
28 | io.netty:netty-resolver:4.1.31.Final
29 | io.netty:netty-tcnative:2.0.18.Final
30 | io.netty:netty-transport-native-epoll:4.1.31.Final
31 | io.netty:netty-transport-native-unix-common:4.1.31.Final
32 | io.netty:netty-transport:4.1.31.Final
33 | io.opentracing.brave:brave-opentracing:0.33.10
34 | io.opentracing:opentracing-api:0.31.0
35 | io.projectreactor.addons:reactor-adapter:3.2.2.RELEASE
36 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
37 | io.projectreactor:reactor-core:3.2.6.RELEASE
38 | io.rsocket.rpc:rsocket-rpc-core:0.2.13.3
39 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
40 | io.rsocket:rsocket-core:0.11.17.2
41 | io.rsocket:rsocket-transport-netty:0.11.17.2
42 | io.zipkin.brave:brave:5.6.1
43 | io.zipkin.reporter2:zipkin-reporter:2.7.14
44 | io.zipkin.zipkin2:zipkin:2.12.0
45 | javax.annotation:javax.annotation-api:1.3.2
46 | javax.inject:javax.inject:1
47 | org.checkerframework:checker-qual:2.5.2
48 | org.codehaus.mojo:animal-sniffer-annotations:1.17
49 | org.hdrhistogram:HdrHistogram:2.1.10
50 | org.latencyutils:LatencyUtils:2.0.3
51 | org.reactivestreams:reactive-streams:1.0.2
52 | org.slf4j:slf4j-api:1.7.25
53 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/googleJavaFormat1.6.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.code.findbugs:jsr305:3.0.2
5 | com.google.errorprone:error_prone_annotations:2.2.0
6 | com.google.errorprone:javac-shaded:9+181-r4173-1
7 | com.google.googlejavaformat:google-java-format:1.6
8 | com.google.guava:failureaccess:1.0.1
9 | com.google.guava:guava:27.0.1-jre
10 | com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
11 | com.google.j2objc:j2objc-annotations:1.1
12 | org.checkerframework:checker-qual:2.5.2
13 | org.codehaus.mojo:animal-sniffer-annotations:1.17
14 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/protobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/protobufToolsLocator_protoc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protoc:3.6.1
5 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/protobufToolsLocator_rsocketRpc.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | io.rsocket.rpc:rsocket-rpc-protobuf:0.2.13.3
5 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/testAnnotationProcessor.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/gradle/dependency-locks/testProtobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/src/main/java/io/netifi/proteus/tracing/ProteusTracerSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 The Proteus Authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package io.netifi.proteus.tracing;
17 |
18 | import brave.Tracing;
19 | import brave.opentracing.BraveTracer;
20 | import io.netifi.proteus.Proteus;
21 | import io.netifi.proteus.rsocket.ProteusSocket;
22 | import io.opentracing.Tracer;
23 | import java.util.Optional;
24 | import java.util.function.Supplier;
25 | import javax.inject.Inject;
26 | import javax.inject.Named;
27 |
28 | @Named("ProteusTracerSupplier")
29 | public class ProteusTracerSupplier implements Supplier {
30 | private final Tracer tracer;
31 |
32 | @Inject
33 | public ProteusTracerSupplier(Proteus proteus, Optional tracingGroup) {
34 | ProteusSocket proteusSocket = proteus.group(tracingGroup.orElse("com.netifi.proteus.tracing"));
35 |
36 | ProteusTracingServiceClient client = new ProteusTracingServiceClient(proteusSocket);
37 | ProteusReporter reporter =
38 | new ProteusReporter(client, proteus.getGroupName(), proteus.getTags());
39 |
40 | Tracing tracing = Tracing.newBuilder().spanReporter(reporter).build();
41 |
42 | tracer = BraveTracer.create(tracing);
43 | }
44 |
45 | @Override
46 | public Tracer get() {
47 | return tracer;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/src/main/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/proteus-tracing-openzipkin/src/test/resources/zipkin_trace.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "traceId": "f66bbb5affbc4681",
4 | "parentId": "f66bbb5affbc4681",
5 | "id": "c38820a7e5e4ac2a",
6 | "name": "sayhello",
7 | "timestamp": 1536152552580050,
8 | "duration": 365,
9 | "localEndpoint": {
10 | "serviceName": "quickstart.services.helloservices",
11 | "ipv4": "192.168.1.104"
12 | },
13 | "annotations": [
14 | {
15 | "timestamp": 1536152552580000,
16 | "value": "onSubscribe"
17 | },
18 | {
19 | "timestamp": 1536152552581000,
20 | "value": "onComplete"
21 | }
22 | ],
23 | "tags": {
24 | "com.netifi.destination": "helloservice-f0ada6e3-60fa-42b0-b6fd-e5e065bed989",
25 | "group": "quickstart.services.helloservices",
26 | "rsocket.rpc.role": "server",
27 | "rsocket.rpc.version": "",
28 | "rsocket.service": "io.netifi.proteus.quickstart.service.HelloService"
29 | }
30 | },
31 | {
32 | "traceId": "f66bbb5affbc4681",
33 | "id": "f66bbb5affbc4681",
34 | "name": "sayhello",
35 | "timestamp": 1536152552578061,
36 | "duration": 5122,
37 | "localEndpoint": {
38 | "serviceName": "quickstart.clients",
39 | "ipv4": "192.168.1.104"
40 | },
41 | "annotations": [
42 | {
43 | "timestamp": 1536152552578000,
44 | "value": "onSubscribe"
45 | },
46 | {
47 | "timestamp": 1536152552582000,
48 | "value": "onComplete"
49 | }
50 | ],
51 | "tags": {
52 | "com.netifi.destination": "client1",
53 | "group": "quickstart.clients",
54 | "rsocket.rpc.role": "client",
55 | "rsocket.rpc.version": "",
56 | "rsocket.service": "io.netifi.proteus.quickstart.service.HelloService"
57 | }
58 | }
59 | ]
--------------------------------------------------------------------------------
/proteus-vizceral-idl/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.google.protobuf'
2 |
3 | description = 'Netifi Proteus Vizceral IDL'
4 |
5 | dependencies {
6 | protobuf 'com.google.protobuf:protobuf-java'
7 |
8 | compileOnly 'javax.inject:javax.inject'
9 |
10 | testCompile 'junit:junit'
11 | testCompile 'javax.inject:javax.inject'
12 | testCompile 'io.projectreactor:reactor-test'
13 | testCompile "com.google.protobuf:protobuf-java"
14 | testCompile 'org.hdrhistogram:HdrHistogram'
15 | testCompile 'org.apache.logging.log4j:log4j-api'
16 | testCompile 'org.apache.logging.log4j:log4j-core'
17 | testCompile 'org.apache.logging.log4j:log4j-slf4j-impl'
18 | testCompile 'io.rsocket:rsocket-transport-netty'
19 | testCompile 'io.rsocket:rsocket-transport-local'
20 | testCompile 'org.mockito:mockito-core'
21 | }
22 |
23 | protobuf {
24 | protoc {
25 | artifact = "com.google.protobuf:protoc"
26 | }
27 | generateProtoTasks {
28 | all()*.enabled = false
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/gradle/dependency-locks/compile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/gradle/dependency-locks/compileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | javax.inject:javax.inject:1
5 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/gradle/dependency-locks/protobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/gradle/dependency-locks/testCompile.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/gradle/dependency-locks/testCompileClasspath.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 | com.google.protobuf:protobuf-java:3.6.1
5 | io.netty:netty-buffer:4.1.31.Final
6 | io.netty:netty-codec-http2:4.1.31.Final
7 | io.netty:netty-codec-http:4.1.31.Final
8 | io.netty:netty-codec-socks:4.1.31.Final
9 | io.netty:netty-codec:4.1.31.Final
10 | io.netty:netty-common:4.1.31.Final
11 | io.netty:netty-handler-proxy:4.1.31.Final
12 | io.netty:netty-handler:4.1.31.Final
13 | io.netty:netty-resolver:4.1.31.Final
14 | io.netty:netty-transport-native-epoll:4.1.31.Final
15 | io.netty:netty-transport-native-unix-common:4.1.31.Final
16 | io.netty:netty-transport:4.1.31.Final
17 | io.projectreactor.netty:reactor-netty:0.8.5.RELEASE
18 | io.projectreactor:reactor-core:3.2.6.RELEASE
19 | io.projectreactor:reactor-test:3.2.6.RELEASE
20 | io.rsocket:rsocket-core:0.11.17.2
21 | io.rsocket:rsocket-transport-local:0.11.17.2
22 | io.rsocket:rsocket-transport-netty:0.11.17.2
23 | javax.inject:javax.inject:1
24 | junit:junit:4.12
25 | net.bytebuddy:byte-buddy-agent:1.9.7
26 | net.bytebuddy:byte-buddy:1.9.7
27 | org.apache.logging.log4j:log4j-api:2.11.2
28 | org.apache.logging.log4j:log4j-core:2.11.2
29 | org.apache.logging.log4j:log4j-slf4j-impl:2.11.2
30 | org.hamcrest:hamcrest-core:1.3
31 | org.hdrhistogram:HdrHistogram:2.1.10
32 | org.mockito:mockito-core:2.25.0
33 | org.objenesis:objenesis:2.6
34 | org.reactivestreams:reactive-streams:1.0.2
35 | org.slf4j:slf4j-api:1.7.25
36 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/gradle/dependency-locks/testProtobuf.lockfile:
--------------------------------------------------------------------------------
1 | # This is a Gradle generated file for dependency locking.
2 | # Manual edits can break the build and are not advised.
3 | # This file is expected to be part of source control.
4 |
--------------------------------------------------------------------------------
/proteus-vizceral-idl/src/main/proto/proteus/vizceral.proto:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright 2019 The Proteus Authors
3 | //
4 | // Licensed under the Apache License, Version 2.0 (the "License");
5 | // you may not use this file except in compliance with the License.
6 | // You may obtain a copy of the License at
7 | //
8 | // http://www.apache.org/licenses/LICENSE-2.0
9 | //
10 | // Unless required by applicable law or agreed to in writing, software
11 | // distributed under the License is distributed on an "AS IS" BASIS,
12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // See the License for the specific language governing permissions and
14 | // limitations under the License.
15 | syntax = "proto3";
16 |
17 | package io.netifi.proteus.vizceral;
18 |
19 | import "google/protobuf/empty.proto";
20 |
21 | option java_package = "io.netifi.proteus.vizceral";
22 | option java_outer_classname = "VizceralProto";
23 | option java_multiple_files = true;
24 |
25 | message Notice {
26 | int32 severity = 1;
27 | string title = 2;
28 | string link = 3;
29 | }
30 |
31 | message Metrics {
32 | double danger = 1;
33 | double normal = 2;
34 | double warning = 3;
35 | }
36 |
37 | message Connection {
38 | string source = 1;
39 | string target = 2;
40 | Metrics metrics = 3;
41 | repeated Notice notices = 4;
42 | int64 updated = 5;
43 | }
44 |
45 | message Node {
46 | string renderer = 1;
47 | string name = 2;
48 | string entryNode = 3;
49 | double maxVolume = 4;
50 | string class = 5;
51 | int64 updated = 6;
52 | repeated Node nodes = 7;
53 | repeated Connection connections = 8;
54 | string displayName = 9;
55 | repeated string metadata = 10;
56 | }
57 |
58 | service VizceralService {
59 |
60 | rpc Visualisations (google.protobuf.Empty) returns (stream Node) {}
61 | }
62 |
--------------------------------------------------------------------------------
/resources/HEADER:
--------------------------------------------------------------------------------
1 | Copyright 2019 The Proteus Authors
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'proteus-java'
2 |
3 | include 'proteus-auth'
4 | include 'proteus-broker-info-idl'
5 | include 'proteus-broker-mgmt-idl'
6 | include 'proteus-frames'
7 | include 'proteus-client'
8 | include 'proteus-common'
9 | include 'proteus-discovery'
10 | include 'proteus-discovery-aws'
11 | include 'proteus-discovery-consul'
12 | include 'proteus-discovery-kubernetes'
13 | include 'proteus-metrics-micrometer'
14 | include 'proteus-metrics-influx'
15 | include 'proteus-metrics-prometheus'
16 | include 'proteus-tracing-openzipkin'
17 | include 'proteus-tracing-idl'
18 | include 'proteus-vizceral-idl'
19 | include 'proteus-bom'
20 |
--------------------------------------------------------------------------------