File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/main/kotlin/org/exploit/keeper/controller/keeper Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package org.exploit.keeper.controller.keeper
3
3
import jakarta.validation.constraints.NotNull
4
4
import jakarta.ws.rs.*
5
5
import jakarta.ws.rs.container.ContainerRequestContext
6
+ import jakarta.ws.rs.core.Response
6
7
import org.exploit.keeper.constant.Permission
8
+ import org.exploit.keeper.constant.StoreState
7
9
import org.exploit.keeper.model.request.KeeperInitData
8
10
import org.exploit.keeper.model.request.Unseal
9
11
import org.exploit.keeper.model.seal.StatusResponse
@@ -34,6 +36,23 @@ class SystemController(
34
36
return keeper.status()
35
37
}
36
38
39
+ @GET
40
+ @Path(" /health" )
41
+ fun health (): Response {
42
+ return Response .noContent().build()
43
+ }
44
+
45
+ @GET
46
+ @Path(" /ready" )
47
+ fun ready (): Response {
48
+ val status = keeper.status().state
49
+
50
+ return if (status == StoreState .UNSEALED )
51
+ Response .noContent().build()
52
+ else
53
+ Response .status(503 ).build()
54
+ }
55
+
37
56
@PUT
38
57
@Path(" /unseal" )
39
58
fun unseal (@NotNull req : Unseal ): Progress {
You can’t perform that action at this time.
0 commit comments