asobi_leaderboard_server (asobi v0.72.5)

View Source

Summary

Functions

around(BoardId, PlayerId, N)

-spec around(binary(), binary(), pos_integer()) -> [{binary(), number(), pos_integer()}].

evict_player(PlayerId)

-spec evict_player(binary()) -> ok.

handle_call(Request, From, State)

-spec handle_call(term(), gen_server:from(), map()) -> {reply, term(), map()}.

handle_cast(Msg, State)

-spec handle_cast(term(), map()) -> {noreply, map()}.

handle_info(Info, State)

-spec handle_info(term(), map()) -> {noreply, map()}.

init(BoardId)

-spec init(binary()) -> {ok, map()}.

live_boards()

-spec live_boards() -> [binary()].

rank(BoardId, PlayerId)

-spec rank(binary(), binary()) -> {ok, pos_integer()} | {error, not_found}.

start_link(BoardId)

-spec start_link(binary()) -> gen_server:start_ret().

submit(BoardId, PlayerId, Score)

-spec submit(binary(), binary(), integer()) -> ok | {error, capacity_reached}.

terminate(Reason, State)

-spec terminate(term(), map()) -> ok.

top(BoardId, N)

-spec top(binary(), pos_integer()) -> [{binary(), number(), pos_integer()}].