public class EtcdClusterConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EtcdClusterConfig.TlsMode |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ADDR_STR |
static int |
DEFAULT_MAX_MSG_SIZE |
protected int |
maxMessageSize |
protected static Pattern |
SIMPLE_PATT |
| Modifier | Constructor and Description |
|---|---|
protected |
EtcdClusterConfig() |
| Modifier and Type | Method and Description |
|---|---|
static EtcdClusterConfig |
fromJson(com.google.common.io.ByteSource source) |
static EtcdClusterConfig |
fromJson(com.google.common.io.ByteSource source,
File dir) |
static EtcdClusterConfig |
fromJsonFile(String file) |
static EtcdClusterConfig |
fromJsonFileOrSimple(String fileOrSimpleString) |
static EtcdClusterConfig |
fromProperties(com.google.common.io.ByteSource source) |
EtcdClient |
getClient() |
static EtcdClient |
getClient(EtcdClusterConfig config) |
Set<String> |
getEndpoints() |
com.google.protobuf.ByteString |
getRootPrefix() |
static EtcdClusterConfig |
newSimpleConfig(String endpoints,
String rootPrefix) |
static void |
shutdownAll()
Should generally only be called during JVM shutdown
|
public static final int DEFAULT_MAX_MSG_SIZE
protected final int maxMessageSize
protected static final String ADDR_STR
protected static final Pattern SIMPLE_PATT
public com.google.protobuf.ByteString getRootPrefix()
public EtcdClient getClient() throws IOException, CertificateException
IOExceptionCertificateExceptionpublic static EtcdClusterConfig newSimpleConfig(String endpoints, String rootPrefix)
public static EtcdClusterConfig fromProperties(com.google.common.io.ByteSource source) throws IOException
IOExceptionpublic static EtcdClusterConfig fromJson(com.google.common.io.ByteSource source, File dir) throws IOException
IOExceptionpublic static EtcdClusterConfig fromJson(com.google.common.io.ByteSource source) throws IOException
IOExceptionpublic static EtcdClusterConfig fromJsonFile(String file) throws IOException
IOExceptionpublic static EtcdClusterConfig fromJsonFileOrSimple(String fileOrSimpleString) throws IOException
fileOrSimpleString - path to json config file or simple config of the form
"endpoint1,endpoint2,...;rootPrefix=<prefix>", where ;rootPrefix=<prefix>
is optional.IOExceptionpublic static EtcdClient getClient(EtcdClusterConfig config) throws IOException, CertificateException
IOExceptionCertificateExceptionpublic static void shutdownAll()
Copyright © 2022. All rights reserved.