View Source shards_partition_sup (shards v1.1.0)

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.

Link to this section Summary

Link to this section Types

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

Link to this section 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().