destrex271 / pgwatch3_rpc_server

RPC Server Implementation for pgwatch3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pgwatch3 RPC Receivers

Running the dummy receiver and client

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;

Tasks

  • Implementing a dummy receiver and client to send the MeasurementMessage Struct
  • Testing if the net/rpc package is suitable for our usecase

About

RPC Server Implementation for pgwatch3


Languages

Language:Go 96.4%Language:Dockerfile 3.6%