Search documentation of phoenix_kit

# PhoenixKit.Admin.SimplePresence (phoenix_kit v1.7.87)

Copy Markdown View Source

Simple presence tracking system for PhoenixKit admin interface.

This is a lightweight alternative to Phoenix.Presence that works without requiring a full OTP application supervision tree.

## Summary

### Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

get_presence_stats()

Gets presence statistics.

get_topic()

Gets the presence topic name.

list_active_sessions()

Lists all active sessions.

list_anonymous_sessions()

Lists anonymous sessions only.

list_authenticated_sessions()

Lists authenticated sessions only.

start_link(opts \\ [])

Starts the simple presence system.

subscribe()

Subscribes to presence events.

track_anonymous(session_id, metadata \\ %{})

Tracks an anonymous session.

track_user(user, metadata \\ %{})

Tracks an authenticated user session.

update_metadata(key, metadata_updates)

Updates metadata for an existing presence.

## Functions

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# get_presence_stats()

Gets presence statistics.

# get_topic()

Gets the presence topic name.

# list_active_sessions()

Lists all active sessions.

# list_anonymous_sessions()

Lists anonymous sessions only.

# list_authenticated_sessions()

Lists authenticated sessions only.

# start_link(opts \\ [])

Starts the simple presence system.

# subscribe()

Subscribes to presence events.

# track_anonymous(session_id, metadata \\ %{})

Tracks an anonymous session.

# track_user(user, metadata \\ %{})

Tracks an authenticated user session.

# update_metadata(key, metadata_updates)

Updates metadata for an existing presence.