提交 3e21eaa6 编写于 作者: wu-sheng's avatar wu-sheng

1. add skywalking-opentracing-kit module 2.add a network client

上级 d5290054
......@@ -13,6 +13,8 @@
<!--<module>skywalking-webui</module>-->
<!--<module>skywalking-sniffer</module>-->
<module>skywalking-storage-center</module>
<module>skywalking-opentracing-kit</module>
<module>samples/skywalking-auth</module>
<module>samples/skywalking-example</module>
</modules>
......
package com.a.eye.skywalking.network;
import com.a.eye.skywalking.network.grpc.SpanStorageServiceGrpc;
import com.a.eye.skywalking.network.grpc.TraceSearchServiceGrpc;
import com.a.eye.skywalking.network.grpc.client.SpanStorageClient;
import com.a.eye.skywalking.network.grpc.client.TraceSearchClient;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import static com.a.eye.skywalking.network.grpc.SpanStorageServiceGrpc.newStub;
public class Client {
private ManagedChannel channel;
private SpanStorageServiceGrpc.SpanStorageServiceStub spanStorageStub;
private TraceSearchServiceGrpc.TraceSearchServiceStub traceSearchServiceStub;
public Client(String ip, int address) {
channel = ManagedChannelBuilder.forAddress(ip, address).usePlaintext(true).build();
spanStorageStub = newStub(channel);
spanStorageStub = SpanStorageServiceGrpc.newStub(channel);
traceSearchServiceStub = TraceSearchServiceGrpc.newStub(channel);
}
......@@ -22,4 +24,7 @@ public class Client {
}
public TraceSearchClient newTraceSearchClient(){
return new TraceSearchClient(traceSearchServiceStub);
}
}
package com.a.eye.skywalking.network.grpc.client;
import com.a.eye.skywalking.network.grpc.TraceSearchServiceGrpc;
/**
* Created by wusheng on 2016/11/26.
*/
public class TraceSearchClient {
private final TraceSearchServiceGrpc.TraceSearchServiceStub traceSearchServiceStub;
public TraceSearchClient(TraceSearchServiceGrpc.TraceSearchServiceStub traceSearchServiceStub) {
this.traceSearchServiceStub = traceSearchServiceStub;
}
}
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<parent>
<artifactId>skywalking</artifactId>
<groupId>com.a.eye</groupId>
<version>2.0-2016</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>skywalking-opentracing-kit</artifactId>
<packaging>jar</packaging>
</project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册