chore: update some pulsar's desc

This commit is contained in:
zhongwencool 2024-02-29 11:44:50 +08:00
parent 650f9659a4
commit e9e1daf962
3 changed files with 5 additions and 6 deletions

View File

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

View File

@ -11,7 +11,6 @@
-export([bridge_v2_examples/1]). -export([bridge_v2_examples/1]).
-define(ACTION_TYPE, pulsar). -define(ACTION_TYPE, pulsar).
-define(CONNECTOR_SCHEMA, emqx_bridge_rabbitmq_connector_schema).
namespace() -> "pulsar". namespace() -> "pulsar".
@ -94,7 +93,7 @@ desc(action_parameters) ->
desc(producer_pulsar_message) -> desc(producer_pulsar_message) ->
?DESC("producer_message_opts"); ?DESC("producer_message_opts");
desc(Method) when Method =:= "get"; Method =:= "put"; Method =:= "post" -> 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(publisher_action); ?DESC(publisher_action);
desc(_) -> desc(_) ->

View File

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