From e2e6d8bca01aedac53b41c5689251e317668f3a0 Mon Sep 17 00:00:00 2001 From: Marcin Antas Date: Tue, 23 Jul 2024 21:43:39 +0200 Subject: [PATCH] Add convenient gRPC Config constructors --- src/main/java/io/weaviate/client/Config.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/io/weaviate/client/Config.java b/src/main/java/io/weaviate/client/Config.java index 98b1dcb1..e4f62687 100644 --- a/src/main/java/io/weaviate/client/Config.java +++ b/src/main/java/io/weaviate/client/Config.java @@ -35,10 +35,18 @@ public Config(String scheme, String host) { this(scheme, host, null, DEFAULT_TIMEOUT_SECONDS, DEFAULT_TIMEOUT_SECONDS, DEFAULT_TIMEOUT_SECONDS); } + public Config(String scheme, String host, boolean gRPCSecured, String gRPCHost) { + this(scheme, host, null, DEFAULT_TIMEOUT_SECONDS, gRPCSecured, gRPCHost); + } + public Config(String scheme, String host, Map headers) { this(scheme, host, headers, DEFAULT_TIMEOUT_SECONDS, DEFAULT_TIMEOUT_SECONDS, DEFAULT_TIMEOUT_SECONDS); } + public Config(String scheme, String host, boolean gRPCSecured, String gRPCHost, Map headers) { + this(scheme, host, headers, DEFAULT_TIMEOUT_SECONDS, gRPCSecured, gRPCHost); + } + public Config(String scheme, String host, Map headers, int connectionTimeout, int connectionRequestTimeout, int socketTimeout) { this.scheme = scheme; this.host = host;