User Tools

Site Tools


cs330_f2016:lab13supervisortree

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cs330_f2016:lab13supervisortree [2017/03/22 15:38] (current)
dhart created
Line 1: Line 1:
 +<file elixir sample_supervisor.exs>​
  
 +defmodule ExampleSuper do
 +  use Supervisor
 +
 +  def start_link(ns) do
 +    Supervisor.start_link(__MODULE__,​ ns )
 +  end
 +
 +  def init(ns) do
 +    children = [
 +      worker(Database,​ [ns]),
 +      worker(CustomerService,​ [ns]),
 +      worker(Info,​ [ns]),
 +      worker(Shipper,​ [ns]),
 +      worker(User,​ [ns]),
 +      worker(Order,​ [ns])
 +    ]
 +
 +    supervise(children,​ strategy: :​one_for_all)
 +  end
 +end
 +
 +</​file>​
cs330_f2016/lab13supervisortree.txt ยท Last modified: 2017/03/22 15:38 by dhart