View Source shards_partition_sup (shards v1.1.1)

This supervisor represents a partitioned table, which is composed by a group of ETS tables, each of them owned by shards_partition.

This supervisor holds and handles the supervision tree for a partitioned table. Every time a new partioned table is created, a new supervision tree is created to handle its lifecycle, and this module is the main supervisor for that tree.

Summary

Types

-type opts() :: #{atom() => term()}.

Functions

-spec start_link(Name, Opts) -> OnStart
                    when
                        Name :: atom(),
                        Opts :: opts(),
                        OnStart :: {ok, pid()} | ignore | {error, term()}.

Equivalent to stop(Pid, 5000).

-spec stop(SupRef, Timeout) -> ok when SupRef :: atom() | pid(), Timeout :: timeout().