forked from vert-x3/vertx-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGateway.java
More file actions
25 lines (19 loc) · 749 Bytes
/
Gateway.java
File metadata and controls
25 lines (19 loc) · 749 Bytes
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
package io.vertx.example.zipkin;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.example.tracing.GatewayVerticle;
import io.vertx.tracing.zipkin.ZipkinTracingOptions;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class Gateway {
public static void main(String[] args) throws InterruptedException, ExecutionException, TimeoutException {
Vertx vertx = Vertx.vertx(new VertxOptions()
.setTracingOptions(new ZipkinTracingOptions().setServiceName("Gateway"))
);
vertx.deployVerticle(new GatewayVerticle())
.toCompletionStage()
.toCompletableFuture()
.get(30, TimeUnit.SECONDS);
}
}