Skip to content

Commit

Permalink
shared-state-async: add publisher call interface
Browse files Browse the repository at this point in the history
  • Loading branch information
javierajorge committed May 9, 2024
1 parent f326ad8 commit a16949f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sinc_args=""

case "$1" in
list)
echo '{ "sync": { "data_type": "str", "peers_ip": "str" }, "get": { "data_type": "str" } }'
echo '{ "sync": { "data_type": "str", "peers_ip": "str" }, "get": { "data_type": "str" }, "publish": { "data_type": "str" } }'
;;
call)
# source jshn shell library
Expand All @@ -33,6 +33,10 @@ case "$1" in
shared-state-async sync $data_type ${peers_ip//,/ } > /dev/null 2>&1
echo {\"data\": {} , \"error\": $? }
;;
publish)
/usr/share/shared-state/publishers/shared-state-publish_$data_type > /dev/null 2>&1
echo {\"data\": {} , \"error\": $? }
;;
*)
echo '{\"data\" {} ,\"error\" = "Method not found"}'
;;
Expand Down

0 comments on commit a16949f

Please sign in to comment.