Skip to content

Commit

Permalink
prepare 0.0.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
gklijs committed Apr 19, 2021
1 parent f8c2eb5 commit 6ef8acf
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/java-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ jobs:
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish package
run: |
mvn \
--no-transfer-progress \
--batch-mode \
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
clean deploy
run: mvn deploy
working-directory: java-client
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down
11 changes: 11 additions & 0 deletions java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,20 @@
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -142,6 +152,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadoc</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,47 @@
import tech.gklijs.bkes.api.StartReply;
import tech.gklijs.bkes.api.StartRequest;

/**
* Implementation for a simple blocking client
*/
public class BlockingClient {

private final BkesGrpc.BkesBlockingStub stub;

/**
* Creates a net blocking client
* @param host host of the bkes server
* @param port port of the bkes server
*/
public BlockingClient(String host, int port) {
stub = BkesGrpc.newBlockingStub(
NettyChannelBuilder.forAddress(host, port).build()
);
}

/**
* Start a new aggregate
* @param request data to start
* @return error or succes
*/
public StartReply start(StartRequest request){
return stub.start(request);
}

/**
* Add to an aggregate
* @param request data to add
* @return error or succes
*/
public AddReply add(AddRequest request){
return stub.add(request);
}

/**
* Retrieve all the records for the key
* @param request data to retrieve
* @return error or success
*/
public RetrieveReply retrieve(RetrieveRequest request){
return stub.retrieve(request);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,47 @@
import tech.gklijs.bkes.api.StartReply;
import tech.gklijs.bkes.api.StartRequest;

/**
* Client working with futures for async processing
*/
public class FutureClient {

private final BkesGrpc.BkesFutureStub stub;

/**
* Creates a new future client
* @param host host of bkes server
* @param port port of bkes server
*/
public FutureClient(String host, int port) {
stub = BkesGrpc.newFutureStub(
NettyChannelBuilder.forAddress(host, port).build()
);
}

/**
* Start an aggregate
* @param request data to start
* @return success or error
*/
public ListenableFuture<StartReply> start(StartRequest request) {
return stub.start(request);
}

/**
* Add to aggregate
* @param request data to add
* @return success or error
*/
public ListenableFuture<AddReply> add(AddRequest request) {
return stub.add(request);
}

/**
* Retrieve al records with a key
* @param request data to retrieve
* @return success or error
*/
public ListenableFuture<RetrieveReply> retrieve(RetrieveRequest request) {
return stub.retrieve(request);
}
Expand Down

0 comments on commit 6ef8acf

Please sign in to comment.