public static void die(Object... args) { throw new ConsulException(sputs(args)); } }
public static void dieWithException(Exception ex, Object... args) { throw new ConsulException(sputs(args), ex); }
/** * Creates a new client given a host and a port. * * @param host The Consul API hostname or IP. * @param port The Consul port. * @return A new client. */ public static Consul consul(final String host, final int port) { try { return new Consul(new URL("http", host, port, "").toString()); } catch (MalformedURLException e) { throw new ConsulException("Bad Consul URL", e); } }
public static void die(Object... args) { throw new ConsulException(sputs(args)); } }
/** * Creates a new client given a host and a port. * * @param host The Consul API hostname or IP. * @param port The Consul port. * @return A new client. */ public static Consul consul(final String host, final int port) { try { return new Consul(new URL("http", host, port, "").toString()); } catch (MalformedURLException e) { throw new ConsulException("Bad Consul URL", e); } }
public static void dieWithException(Exception ex, Object... args) { throw new ConsulException(sputs(args), ex); }