fix(rocketmq): improve function name

This commit is contained in:
firest 2023-06-05 10:43:28 +08:00
parent 62d7b55092
commit 5921ed3d2e
2 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ on_stop(InstanceId, _State) ->
({_, _Topic, Producer}) -> ({_, _Topic, Producer}) ->
_ = rocketmq:stop_and_delete_supervised_producers(Producer) _ = rocketmq:stop_and_delete_supervised_producers(Producer)
end, end,
emqx_resource:lookup_allocated_resources(InstanceId) emqx_resource:get_allocated_resources_list(InstanceId)
). ).
on_query(InstanceId, Query, State) -> on_query(InstanceId, Query, State) ->

View File

@ -85,7 +85,7 @@
allocate_resource/3, allocate_resource/3,
has_allocated_resources/1, has_allocated_resources/1,
get_allocated_resources/1, get_allocated_resources/1,
lookup_allocated_resources/1, get_allocated_resources_list/1,
forget_allocated_resources/1 forget_allocated_resources/1
]). ]).
@ -520,8 +520,8 @@ get_allocated_resources(InstanceId) ->
Objects = ets:lookup(?RESOURCE_ALLOCATION_TAB, InstanceId), Objects = ets:lookup(?RESOURCE_ALLOCATION_TAB, InstanceId),
maps:from_list([{K, V} || {_InstanceId, K, V} <- Objects]). maps:from_list([{K, V} || {_InstanceId, K, V} <- Objects]).
-spec lookup_allocated_resources(resource_id()) -> list(tuple()). -spec get_allocated_resources_list(resource_id()) -> list(tuple()).
lookup_allocated_resources(InstanceId) -> get_allocated_resources_list(InstanceId) ->
ets:lookup(?RESOURCE_ALLOCATION_TAB, InstanceId). ets:lookup(?RESOURCE_ALLOCATION_TAB, InstanceId).
-spec forget_allocated_resources(resource_id()) -> ok. -spec forget_allocated_resources(resource_id()) -> ok.