asobi_guest_reaper (asobi v0.84.0)

View Source

Summary

Functions

cached_unlinked_count()

-spec cached_unlinked_count() -> non_neg_integer() | unknown.

handle_call/3

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

handle_cast(Msg, State)

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

handle_info/2

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

init/1

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

start_link()

-spec start_link() -> {ok, pid()} | {error, term()}.

sweep_now()

-spec sweep_now() -> {ok, non_neg_integer()}.

unclaimed_guest(PlayerId)

-spec unclaimed_guest(binary()) -> boolean().

Whether PlayerId is a guest nobody has claimed.

Unclaimed means the player never set a password and owns no identity from another provider - linking Google or Steam is a claim even though asobi_oauth_controller:link/1 sets no password and leaves the guest identity in place. The upgrade predicate inside asobi_guest_controller is a deliberately different, looser question - may this account be upgraded - and is not a substitute for this one anywhere erasure is involved.

Answers false when a lookup fails, so a caller about to delete something fails closed.