Fledex.Supervisor.LedStripSupervisor (fledex v0.7.0)
View SourceThis is the supervisor for an led strip and all it's workers, like :animators, :coordinators, and :jobs
You should start, stop, and interact with the workers through this module.
Summary
Functions
Returns a specification to start this module under a supervisor.
This returns a list of all the defined workers of a specified type (:animator, :coordinator, or "job)
This reconfigures a job
Start a new supervisor for an led strip.
This starts a new worker.
Stop the supervisor (and all it's children)
This stops a worker.
This checks whether a specified worker exists
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_workers(atom(), Fledex.Supervisor.Utils.led_strip_worker_types()) :: [ atom() ]
This returns a list of all the defined workers of a specified type (:animator, :coordinator, or "job)
@spec reconfigure_worker( atom(), Fledex.Supervisor.Utils.led_strip_worker_types(), atom(), Fledex.Supervisor.Utils.led_strip_worker_configs() ) :: :ok
This reconfigures a job
@spec start_link(atom(), Fledex.LedStrip.drivers_config_t(), keyword(), keyword()) :: Supervisor.on_start()
Start a new supervisor for an led strip.
@spec start_worker( atom(), Fledex.Supervisor.Utils.led_strip_worker_types(), atom(), Fledex.Supervisor.Utils.led_strip_worker_configs(), keyword() ) :: DynamicSupervisor.on_start_child()
This starts a new worker.
Differnet types of workers exist (:animator, :coordinator, and :job) and the configuration needs to fit to the
type of worker.
@spec stop(atom()) :: :ok
Stop the supervisor (and all it's children)
@spec stop_worker(atom(), Fledex.Supervisor.Utils.led_strip_worker_types(), atom()) :: :ok
This stops a worker.
It is safe to call this function even if the worker does not exist
@spec worker_exists?(atom(), Fledex.Supervisor.Utils.led_strip_worker_types(), atom()) :: boolean()
This checks whether a specified worker exists