public class DeploymentUtil extends Object
/vhosts/local-svc.leanix.net/deploy_current or
/vhosts/local-eam.leanix.net/deploy_current. In oder to use this class you have to specify:
* ETCD_SERVER : the etcd server, e.g. '192.168.59.103:4001' * CONTAINER_COLOR: 'green', 'blue' or 'white' * VIRTUAL_HOST : the virtual host name e.g. 'local-eam.leanix.net' (default: local-svc.leanix.net)
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTAINER_COLOR |
static String |
ETCD_SERVER |
static String |
VIRTUAL_HOST |
| Constructor and Description |
|---|
DeploymentUtil() |
DeploymentUtil(MinimalEtcdClientFactory etcdClientFactory) |
| Modifier and Type | Method and Description |
|---|---|
String |
buildKeyForVirtualHost(String key) |
void |
deleteEtcdKey(String key,
boolean recursive) |
boolean |
deleteEtcdKeyIfNeeded(String key,
boolean recursive) |
DeploymentColor |
getContainerColor()
Returns current container color if set.
|
DeploymentColor |
getContainerColorOrDefault(DeploymentColor defaultColor)
Returns current color or defaultColor if not set.
|
MinimalEtcdClient |
getEtcdClient() |
String |
getVirtualHost() |
boolean |
isEtcdConfigured() |
boolean |
isInstanceCurrentlyActive() |
List<String> |
listEtcdKey(String key) |
String |
retrieveEtcdValue(String key) |
void |
writeEtcdValue(String key,
String value) |
boolean |
writeEtcdValueIfNeeded(String key,
String value) |
public static final String VIRTUAL_HOST
public static final String CONTAINER_COLOR
public static final String ETCD_SERVER
public DeploymentUtil(MinimalEtcdClientFactory etcdClientFactory)
public DeploymentUtil()
public DeploymentColor getContainerColor()
public DeploymentColor getContainerColorOrDefault(DeploymentColor defaultColor)
public boolean isInstanceCurrentlyActive()
public String retrieveEtcdValue(String key) throws EtcdException
EtcdExceptionpublic void writeEtcdValue(String key, String value) throws EtcdException
EtcdExceptionpublic boolean writeEtcdValueIfNeeded(String key, String value) throws EtcdException
EtcdExceptionpublic List<String> listEtcdKey(String key) throws EtcdException
EtcdExceptionpublic void deleteEtcdKey(String key, boolean recursive) throws EtcdException
EtcdExceptionpublic boolean deleteEtcdKeyIfNeeded(String key, boolean recursive) throws EtcdException
EtcdExceptionpublic String getVirtualHost()
public MinimalEtcdClient getEtcdClient()
public boolean isEtcdConfigured()
Copyright © 2020 LeanIX GmbH. All rights reserved.