Please see:
cat echo_service.proto
python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./echo_service.proto
cat echo_service.py
screen -d -m python3 echo_service.py
cat echo_client.py
python3 echo_client.py
snet identity publisher
snet service metadata_init . EchoService $PUBLISHER_ADDR --encoding proto --service_type grpc
snet service metadata_set_fixed_price 3
snet service metadata_add_endpoints http://127.0.0.1:8080
cat service_metadata.json
snet service publish ExampleOrganization EchoService --yes
cat snetd.config.json
screen -d -m snetd-linux-amd64
snet identity caller
snet client open_init_channel_registry ExampleOrganization EchoService 50 57600 -y
snet client call 0 3 localhost:8080 echo '{"message": "hello"}'
stop_service.sh
Next Example
Last modified on : 15-Oct-24