diff --git a/src/keria/app/agenting.py b/src/keria/app/agenting.py index 7b117a2..48dab01 100644 --- a/src/keria/app/agenting.py +++ b/src/keria/app/agenting.py @@ -28,7 +28,7 @@ from keri.db import dbing from keri.db.basing import OobiRecord from keria.end import ending -from keri.help import helping, ogler +from keri.help import helping, ogler, nowIso8601 from keri.peer import exchanging from keri.vc import protocoling from keri.vdr import verifying @@ -58,6 +58,7 @@ def setup(name, bran, adminPort, bootPort, base='', httpPort=None, configFile=No bootServerDoer = http.ServerDoer(server=bootServer) bootEnd = BootEnd(agency) bootApp.add_route("/boot", bootEnd) + bootApp.add_route("/health", HealthEnd()) # Create Authenticater for verifying signatures on all requests authn = Authenticater(agency=agency) @@ -674,6 +675,14 @@ def on_post(self, req, rep): rep.status = falcon.HTTP_202 +class HealthEnd: + """Health resource for determining that a container is live""" + + def on_get(self, req, resp): + resp.status = falcon.HTTP_OK + resp.media = {"message": f"Health is okay. Time is {nowIso8601()}"} + + class KeyStateCollectionEnd: @staticmethod