Skip to content

Commit

Permalink
Fix routing_key type
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Feb 18, 2025
1 parent 2a1f341 commit e9171c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/marina.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@
page_size => pos_integer(),
paging_state => binary(),
pid => pid(),
routing_key => binary(),
routing_key => routing_key(),
skip_metadata => boolean(),
timeout => pos_integer(),
values => values()
}.

-type result() :: #result {}.
-type result_metadata() :: #result_metadata {}.
-type routing_key() :: integer() | binary().
-type statement_id() :: binary().
-type stream() :: 0..32768.
-type value() :: binary().
Expand Down
2 changes: 1 addition & 1 deletion src/marina_ring.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build(Nodes) ->
Ranges = ranges(lists:usort(lists:flatten(Ring))),
marina_compiler:ring_utils(Ranges).

-spec lookup(binary()) ->
-spec lookup(routing_key()) ->
atom().

lookup(Key) ->
Expand Down
2 changes: 1 addition & 1 deletion src/marina_token.erl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]).

%% public
-spec m3p(integer() | binary()) ->
-spec m3p(routing_key()) ->
integer().

m3p(Key) when is_integer(Key) ->
Expand Down

0 comments on commit e9171c5

Please sign in to comment.