Class ConsulClient
java.lang.Object
org.qubership.integration.platform.engine.consul.ConsulClient
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConsulClient(org.springframework.web.client.RestTemplate restTemplate, String consulUrl) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateOrUpdateKV(String key, Object value) voidcreateOrUpdateKVWithSession(String key, Object value, String sessionId) createSession(String name, String behavior, String ttl) voiddeleteSession(String previousSessionId) voidrenewSession(String activeSessionId) org.apache.commons.lang3.tuple.Pair<Long, List<KeyResponse>> waitForKVChanges(String key, boolean recurse, long index, String waitTimeout)
-
Field Details
-
CONSUL_TOKEN_HEADER
- See Also:
-
CONSUL_INDEX_HEADER
- See Also:
-
CONSUL_KV_PATH
- See Also:
-
CREATE_SESSION_PATH
- See Also:
-
DELETE_SESSION_PATH
- See Also:
-
RENEW_SESSION_PATH
- See Also:
-
CONSUL_KV_QUERY_PARAMS
- See Also:
-
-
Constructor Details
-
ConsulClient
@Autowired public ConsulClient(@Qualifier("consulRestTemplateMS") org.springframework.web.client.RestTemplate restTemplate, @Value("${consul.url}") String consulUrl)
-
-
Method Details
-
renewSession
-
createSession
-
deleteSession
-
createOrUpdateKVWithSession
-
createOrUpdateKV
-
waitForKVChanges
public org.apache.commons.lang3.tuple.Pair<Long,List<KeyResponse>> waitForKVChanges(String key, boolean recurse, long index, String waitTimeout) throws KVNotFoundException - Throws:
KVNotFoundException
-