Skip to content

Commit 2b84454

Browse files
committed
also getHealth
1 parent aa97c74 commit 2b84454

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/api/rpc_server.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,15 @@ fn build_rpc_module(api_and_indexer: PhotonApi) -> Result<RpcModule<PhotonApi>,
169169
.map_err(Into::into)
170170
})?;
171171

172+
// Alias for getIndexerHealth, to enable compatibility with health check
173+
module.register_async_method("getHealth", |_rpc_params, rpc_context| async move {
174+
rpc_context
175+
.as_ref()
176+
.get_indexer_health()
177+
.await
178+
.map_err(Into::into)
179+
})?;
180+
172181
module.register_async_method("getIndexerSlot", |_rpc_params, rpc_context| async move {
173182
let api = rpc_context.as_ref();
174183
api.get_indexer_slot().await.map_err(Into::into)

0 commit comments

Comments
 (0)