Open the project in two terminals.
In the first terminal start the server i.e. in the folder pgwatch3_rpc_server/src Currently we are using a demo text receiver by default which will store the measurements in a text file. Later on we'll add command line arguments to specify the sink type.
To start the receiver:
# For Text sinks
pgwatch3_rpc_server/src git:(main)$ go run .go run . --type=text
# For CSV sinks
pgwatch3_rpc_server/src git:(main)$ go run .go run . --type=csv
In the second terminal switch to the directory dummy_client/src
and run:
# Sends Measurements 40 times continously to the receiver
for i in {1..40}; do go run .; done;
Implementing a dummy receiver and client to send the MeasurementMessage StructTesting if the net/rpc package is suitable for our usecase