Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

39 Commits

Repository files navigation

OpenSergo Logo

OpenSergo Java SDK

OpenSergo Java SDK CIMaven CentralLicense

Introduction

Documentation

See the OpenSergo Website for the official website of OpenSergo.

See the 中文文档 for document in Chinese.

Quick Start

  1. Add dependency in Maven pom.xml:
<!-- replace here with the latest version -->
<dependency>
<groupId>io.opensergo</groupId>
<artifactId>opensergo-java-sdk</artifactId>
<version>0.1.0</version>
</dependency>
  1. Subscribe data from OpenSergo control plane:
// 1. Create client with remote host and port of OpenSergo control planeOpenSergoClientclient = OpenSergoClientManager.get().getOrCreateClient(host, port);
// 2. Start the OpenSergo client.client.start();
// 3. Subscribe the config of the target (namespace, appName, kind)client.subscribeConfig(newSubscribeKey("default", "my-service", configKind),
newOpenSergoConfigSubscriber() {
@OverridepublicbooleanonConfigUpdate(SubscribeKeysubscribeKey, ObjectdataList) {
// Handle received config hereSystem.out.println("key: " + subscribeKey + ", data: " + dataList);
returntrue;
}
});

About

OpenSergo Java SDK

Topics

Resources

Stars

42 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages