Skip to content

Commit b605fad

Browse files
committed
Add /vss/health endpoint returning HTTP 200
Closes #29
1 parent 53d1fad commit b605fad

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/build-and-deploy-rust.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
run: |
4646
sleep 5
4747
48+
# Health check
49+
curl -f http://localhost:8080/vss/health
50+
4851
# Put request with store='storeId' and key=k1
4952
hex=0A0773746F726549641A150A026B3110FFFFFFFFFFFFFFFFFF011A046B317631
5053
curl -f --data-binary "$(echo "$hex" | xxd -r -p)" http://localhost:8080/vss/putObjects

rust/server/src/vss_service.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ impl Service<Request<Incoming>> for VssService {
8080
let prefix_stripped_path = path.strip_prefix(BASE_PATH_PREFIX).unwrap_or_default();
8181

8282
match prefix_stripped_path {
83+
"/health" => Ok(Response::builder()
84+
.status(StatusCode::OK)
85+
.body(Full::new(Bytes::new()))
86+
.unwrap()),
8387
"/getObject" => {
8488
handle_request(
8589
store,

0 commit comments

Comments
 (0)