Skip to content

Commit ff13ff6

Browse files
authored
Update README.md
1 parent 9b7964d commit ff13ff6

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
1-
# Synapse Test Utils Library
1+
# Synapse Utils Library
22

3-
## heartbeat.py
3+
## Overview
4+
5+
This is a utility library for Synapse development. You can import it at the top of your python script with
6+
```
7+
import synapse_utils
8+
```
9+
It contains a range of helper modules/functions for development purposes (eg. creating tests for Crossbar components).
10+
11+
## How To Use
12+
13+
To import this package with poetry as dependency package manager:
14+
```
15+
poetry add git+https://github.com/SPHTech/synapse-utils.git
16+
```
17+
18+
## Documentation for package modules
19+
20+
### heartbeat.py
421

522
For Kubernetes(K8s) deployment, readiness and liveness probes are used to check if the container in the pod is ready and still functioning.
623

724
Upon start-up, each crossbar component will register a Remote Procedure Call (RPC) on its own "heartbeat" topic. K8s readiness and liveness probes would trigger a [heartbeat component script](heartbeat.py), and this component would call that heartbeat RPC. The crossbar component is deemed to be working if the trigger completes successfully, else the probes would fail and the container in the pod would be restarted.
825

9-
## probe.py
26+
### probe.py
1027

1128
Contains functions to start up a component and block until it is ready, as well as to make a crossbar component that subscribes to a crossbar topic and store the messages it receives.

0 commit comments

Comments
 (0)