jiahuili430 commented on code in PR #5546:
URL: https://github.com/apache/couchdb/pull/5546#discussion_r2112662020


##########
src/dreyfus/src/clouseau_rpc.erl:
##########
@@ -316,3 +326,46 @@ rpc(Ref, Msg) ->
 
 clouseau() ->
     list_to_atom(config:get("dreyfus", "name", "[email protected]")).
+
+-type service() :: sup | main | analyzer | cleanup.
+-type liveness_status() :: alive | timeout.
+
+-spec clouseau_services(MajorVsn) -> [service()] when
+    MajorVsn :: binary() | null.
+clouseau_services(_MajorVsn) ->
+    [sup, main, analyzer, cleanup].
+
+-spec is_valid(Service) -> boolean() when
+    Service :: atom().
+is_valid(Service) when is_atom(Service) ->
+    lists:member(Service, clouseau_services(clouseau_major_vsn())).
+
+-spec check_service(Service) -> {service(), liveness_status()} | no_return() 
when

Review Comment:
   Updated all throwing functions to `throw({atom(), binary()})`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to