Package com.youtube.vitess.vtgate.rpcclient.gorpc

Examples of com.youtube.vitess.vtgate.rpcclient.gorpc.GoRpcClient


  public static RpcClient get(String address, int timeoutMs) throws ConnectionException {
    try {
      HostAndPort hostAndPort = HostAndPort.fromString(address);
      Client client = Client.dialHttp(hostAndPort.getHostText(), hostAndPort.getPort(),
          GoRpcClient.BSON_RPC_PATH, timeoutMs, new BsonClientCodecFactory());
      return new GoRpcClient(client);
    } catch (GoRpcException e) {
      GoRpcClient.LOGGER.error("vtgate connection exception: ", e);
      throw new ConnectionException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of com.youtube.vitess.vtgate.rpcclient.gorpc.GoRpcClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.