use of io.grpc.Channel in project dble by actiontech.
the class UOffLineListener method init.
public void init() {
Channel channel = ManagedChannelBuilder.forAddress(UcoreConfig.getInstance().getValue(ClusterParamCfg.CLUSTER_PLUGINS_IP), Integer.parseInt(UcoreConfig.getInstance().getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build();
stub = UcoreGrpc.newBlockingStub(channel);
}
use of io.grpc.Channel in project dble by actiontech.
the class UcoreSingleKeyListener method init.
public void init() {
Channel channel = ManagedChannelBuilder.forAddress(UcoreConfig.getInstance().getValue(ClusterParamCfg.CLUSTER_PLUGINS_IP), Integer.parseInt(UcoreConfig.getInstance().getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build();
stub = UcoreGrpc.newBlockingStub(channel);
}
use of io.grpc.Channel in project pinpoint by naver.
the class UnaryCallDeadlineInterceptorTest method withoutDeadlineTest.
@Test
public void withoutDeadlineTest() {
Channel channel = new TestChannel();
UnaryCallDeadlineInterceptor unaryCallDeadlineInterceptor = new UnaryCallDeadlineInterceptor(5000);
unaryCallDeadlineInterceptor.interceptCall(createMethodDescritor(MethodDescriptor.MethodType.BIDI_STREAMING), CallOptions.DEFAULT.withAuthority("test"), channel);
Assert.assertNull(((TestChannel) channel).callOptions.getDeadline());
}
use of io.grpc.Channel in project pinpoint by naver.
the class UnaryCallDeadlineInterceptorTest method withDeadlineTest.
@Test
public void withDeadlineTest() {
Channel channel = new TestChannel();
UnaryCallDeadlineInterceptor unaryCallDeadlineInterceptor = new UnaryCallDeadlineInterceptor(5000);
ClientCall<PAgentInfo, PResult> pAgentInfoPResultClientCall = unaryCallDeadlineInterceptor.interceptCall(createMethodDescritor(MethodDescriptor.MethodType.UNARY), CallOptions.DEFAULT.withAuthority("test"), channel);
Assert.assertNotNull(((TestChannel) channel).callOptions.getDeadline());
}
use of io.grpc.Channel in project beam by apache.
the class GrpcWindmillServer method initializeLocalHost.
private synchronized void initializeLocalHost(int port) throws IOException {
this.logEveryNStreamFailures = 1;
this.maxBackoff = Duration.millis(500);
// For local testing use short deadlines.
this.unaryDeadlineSeconds = 10;
Channel channel = localhostChannel(port);
if (streamingEngineEnabled()) {
this.stubList.add(CloudWindmillServiceV1Alpha1Grpc.newStub(channel));
this.syncStubList.add(CloudWindmillServiceV1Alpha1Grpc.newBlockingStub(channel));
} else {
this.syncApplianceStub = WindmillApplianceGrpc.newBlockingStub(channel);
}
}
Aggregations