gossip v0.6.0 Gossip.Players View Source

Track remote players as they sign in and out on Gossip

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Update the local player list after a players/status event comes in

Receive a new “players/status” event from the Gossip socket

For tests only - resets the player list state

A player has signed into a remote game

A player has signed out of a remote game

See who is signed into remote games

Link to this section Types

Link to this type status() View Source
status() :: %{}
Link to this type who_list() View Source
who_list() :: %{optional(Gossip.game_name()) => [Gossip.player_name()]}

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function player_list(game_name, players) View Source
player_list(Gossip.game_name(), [Gossip.player_name()]) :: :ok

Update the local player list after a players/status event comes in

Receive a new “players/status” event from the Gossip socket

This checks for local calls before maybe updating the local cache

For internal use.

For tests only - resets the player list state

Link to this function sign_in(game_name, player_name) View Source

A player has signed into a remote game

Link to this function sign_out(game_name, player_name) View Source

A player has signed out of a remote game

See who is signed into remote games