View Source Nostrum.Store.GuildShardMapping.ETS (Nostrum v0.10.0)
Maintains a mapping of guild IDs to their shard numbers using :ets
.
If programmatic access to the ETS table is needed, please use the table/0
function.
Please do not use this module directly, apart from special functions such as
table/0
. Use Nostrum.Store.GuildShardMapping
to call the configured
mapping instead.
Summary
Functions
Returns a specification to start this module under a supervisor.
Create a new mapping for the given guild ID to the given shard ID.
Delete any stored mapping for the given guild ID.
Get the shard number for the given guild ID.
Set up the store's ETS table.
Start the supervisor.
Retrieve the ETS table reference used for the store.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec create(Nostrum.Struct.Guild.id(), Nostrum.Struct.WSState.shard_num()) :: :ok
Create a new mapping for the given guild ID to the given shard ID.
@spec delete(Nostrum.Struct.Guild.id()) :: :ok
Delete any stored mapping for the given guild ID.
@spec get(Nostrum.Struct.Guild.id()) :: Nostrum.Struct.WSState.shard_num() | nil
Get the shard number for the given guild ID.
Set up the store's ETS table.
Start the supervisor.
@spec table() :: :ets.table()
Retrieve the ETS table reference used for the store.