Skip to content

Commit

Permalink
Remove health calls (#23)
Browse files Browse the repository at this point in the history
* Update protos & remove health calls

Signed-off-by: Jonathan Marcantonio <[email protected]>

* Unnecessary import

Signed-off-by: Jonathan Marcantonio <[email protected]>

---------

Signed-off-by: Jonathan Marcantonio <[email protected]>
  • Loading branch information
lennysgarage authored Aug 30, 2024
1 parent c166c26 commit e5225ac
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 74 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,4 @@ public RelationTuplesClient getRelationTuplesClient() {
public LookupClient getLookupClient() {
return new LookupClient(channel);
}

public HealthClient getHealthClient() {
return new HealthClient(channel);
}
}
43 changes: 0 additions & 43 deletions src/main/java/org/project_kessel/relations/example/Caller.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.project_kessel.relations.example;

import org.project_kessel.api.relations.v1beta1.*;
import org.project_kessel.api.relations.v1.GetLivezRequest;
import org.project_kessel.api.relations.v1.GetReadyzRequest;
import io.grpc.stub.StreamObserver;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
Expand Down Expand Up @@ -115,8 +113,6 @@ public void onCompleted() {
})
.await().indefinitely();

getLivezExample();
getReadyzExample();
getRelationshipsExample();
lookupSubjectsExample();
lookupResourcesExample();
Expand Down Expand Up @@ -202,45 +198,6 @@ public void onCompleted() {

}

public static void getLivezExample() {
var url = "localhost:9000";

var clientsManager = RelationsGrpcClientsManager.forInsecureClients(url);
var healthClient = clientsManager.getHealthClient();

var getLivezRequest = GetLivezRequest.newBuilder().build();

/* Blocking */
var getLivezResponse = healthClient.livez(getLivezRequest);
var status = getLivezResponse.getStatus().equals("OK");

if (status) {
System.out.println("Blocking: OK");
} else {
System.out.println("Blocking: Unavailable");
}
}


public static void getReadyzExample() {
var url = "localhost:9000";

var clientsManager = RelationsGrpcClientsManager.forInsecureClients(url);
var healthClient = clientsManager.getHealthClient();

var getReadyzRequest = GetReadyzRequest.newBuilder().build();

/* Blocking */
var getReadyzResponse = healthClient.readyz(getReadyzRequest);
var status = getReadyzResponse.getStatus().equals("OK");

if (status) {
System.out.println("Blocking: OK");
} else {
System.out.println("Blocking: Unavailable");
}
}

public static void lookupSubjectsExample() {
var url = "localhost:9000";

Expand Down

0 comments on commit e5225ac

Please sign in to comment.