Преглед изворни кода

chore: update some pulsar's desc

zhongwencool пре 1 година
родитељ
комит
e9e1daf962

+ 3 - 3
apps/emqx_bridge_pulsar/src/emqx_bridge_pulsar_connector.erl

@@ -182,7 +182,7 @@ on_get_channel_status(_InstanceId, ChannelId, #{channels := Channels}) ->
         {ok, #{producers := Producers}} ->
             get_producer_status(Producers);
         error ->
-            {error, channel_not_exists}
+            {error, channel_not_found}
     end.
 
 -spec on_query(resource_id(), tuple(), state()) ->
@@ -193,7 +193,7 @@ on_query(_InstanceId, {ChannelId, Message}, State) ->
     #{channels := Channels} = State,
     case maps:find(ChannelId, Channels) of
         error ->
-            {error, channel_not_exists};
+            {error, channel_not_found};
         {ok, #{message := MessageTmpl, sync_timeout := SyncTimeout, producers := Producers}} ->
             PulsarMessage = render_message(Message, MessageTmpl),
             try
@@ -212,7 +212,7 @@ on_query_async(_InstanceId, {ChannelId, Message}, AsyncReplyFn, State) ->
     #{channels := Channels} = State,
     case maps:find(ChannelId, Channels) of
         error ->
-            {error, channel_not_exists};
+            {error, channel_not_found};
         {ok, #{message := MessageTmpl, producers := Producers}} ->
             ?tp_span(
                 pulsar_producer_on_query_async,

+ 1 - 2
apps/emqx_bridge_pulsar/src/emqx_bridge_pulsar_pubsub_schema.erl

@@ -11,7 +11,6 @@
 -export([bridge_v2_examples/1]).
 
 -define(ACTION_TYPE, pulsar).
--define(CONNECTOR_SCHEMA, emqx_bridge_rabbitmq_connector_schema).
 
 namespace() -> "pulsar".
 
@@ -94,7 +93,7 @@ desc(action_parameters) ->
 desc(producer_pulsar_message) ->
     ?DESC("producer_message_opts");
 desc(Method) when Method =:= "get"; Method =:= "put"; Method =:= "post" ->
-    ["Configuration for WebHook using `", string:to_upper(Method), "` method."];
+    ["Configuration for Pulsar Producer using `", string:to_upper(Method), "` method."];
 desc(publisher_action) ->
     ?DESC(publisher_action);
 desc(_) ->

+ 1 - 1
rel/i18n/emqx_bridge_pulsar_pubsub_schema.hocon

@@ -6,7 +6,7 @@ action_parameters.label:
 """Action"""
 
 publisher_action.desc:
-"""Publish message to pulsar topic"""
+"""Publish message to Pulsar topic"""
 publisher_action.label:
 """Publish Action """