Ankusa.SourceStore.Redis.TableOwner (ankusa_redis v0.7.0)

Copy Markdown View Source

Keeps the source mirror alive across a restart of the store's state process: it creates the table and is its heir, the state process takes it over with hand_over/2, and when that process dies the table comes back here instead of being deleted.

Summary

Functions

Returns a specification to start this module under a supervisor.

Give the table to pid (the state process).

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

hand_over(instance, pid)

@spec hand_over(atom(), pid()) :: :ok | {:error, :not_running | :owned_elsewhere}

Give the table to pid (the state process).

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()