consul-api

Library for using consul

Лицензия

Лицензия

Категории

Категории

Сеть consul-api Контейнер Микросервисы
Группа

Группа

net.nikore.consul
Идентификатор

Идентификатор

consul-api
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

consul-api
Library for using consul
Ссылка на сайт

Ссылка на сайт

https://github.com/nikore/consul-api
Система контроля версий

Система контроля версий

https://github.com/nikore/consul-api

Скачать consul-api

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.nikore.consul/consul-api/ -->
<dependency>
    <groupId>net.nikore.consul</groupId>
    <artifactId>consul-api</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.nikore.consul/consul-api/
implementation 'net.nikore.consul:consul-api:1.0.0'
// https://jarcasting.com/artifacts/net.nikore.consul/consul-api/
implementation ("net.nikore.consul:consul-api:1.0.0")
'net.nikore.consul:consul-api:jar:1.0.0'
<dependency org="net.nikore.consul" name="consul-api" rev="1.0.0">
  <artifact name="consul-api" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.nikore.consul', module='consul-api', version='1.0.0')
)
libraryDependencies += "net.nikore.consul" % "consul-api" % "1.0.0"
[net.nikore.consul/consul-api "1.0.0"]

Зависимости

compile (5)

Идентификатор библиотеки Тип Версия
org.apache.httpcomponents : httpcore jar 4.3.2
org.apache.httpcomponents : httpclient jar 4.3.2
com.fasterxml.jackson.core : jackson-core jar 2.4.2
com.fasterxml.jackson.core : jackson-databind jar 2.4.2
com.google.guava : guava jar 15.0

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

consul-api

Java client for Consul HTTP API (http://consul.io)

Supports all API endpoints (http://www.consul.io/docs/agent/http.html), all consistency modes and parameters (tags, datacenters etc.)

How to use

ConsulClient client = new ConsulClient("localhost");

// register new service
NewService newService = new NewService();
newService.setId("myapp_01");
newService.setName("myapp");
newService.setPort(8080);
client.agentServiceRegister(newService);

// KV
byte[] binaryData = new byte[] {1,2,3,4,5,6,7};
client.setKVBinaryValue("someKey", binaryData);

String value = client.getKVValue("somekey").getValue().getValue();

//list known datacenters
Response<List<String>> response = client.getCatalogDatacenters();
System.out.println("Datacenters: " + response.getValue());

Версии библиотеки

Версия
1.0.0