Anubis.Test.MockSessionStore (anubis_mcp v1.6.1)

Copy Markdown

Mock session store for testing persistence functionality.

Uses an Agent to store sessions in-memory, simulating a real store but without external dependencies.

Summary

Functions

child_spec(arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

cleanup_expired(opts)

Callback implementation for Anubis.Server.Session.Store.cleanup_expired/1.

delete(session_id, opts)

Callback implementation for Anubis.Server.Session.Store.delete/2.

get_all_sessions()

list_active(opts)

Callback implementation for Anubis.Server.Session.Store.list_active/1.

load(session_id, opts)

Callback implementation for Anubis.Server.Session.Store.load/2.

reset!()

save(session_id, state, opts)

Callback implementation for Anubis.Server.Session.Store.save/3.

start_link(opts)

Callback implementation for Anubis.Server.Session.Store.start_link/1.

update(session_id, updates, opts)

Callback implementation for Anubis.Server.Session.Store.update/3.

update_ttl(session_id, ttl_seconds, opts)

Callback implementation for Anubis.Server.Session.Store.update_ttl/3.