Together.Supervisor (together v0.5.1)

Start with application configs

supervisor(Together.Supervisor, [])

Start with configs passed in

supervisor(Together.Supervisor, [workers: ..., store: ...])

example-config

Example config

config :together,
  workers: [
    # name is required, can be anything, prefer strings
    [name: "throttled_job", delay: 30_000, type: :throttle],
    [name: "debounced_job", delay: 5_000, type: :debounce],
    [name: "keep_first_job", keep: :first],
    # etc
  ],
  # omissible, if you don't want to change anything
  store: [
    # name for the Store process
    name: MyApp.Together.Store,
    # name for the ExShards main process
    shards_name: MyApp.Together.Store.Shards,
    # for distributed ets
    scope: :g,
    # nodes in the cluster, will use `Node.list` if omitted
    nodes: [:"node2@172.18.0.3", :"node3@172.18.0.4"]
  ]

or you could pass the configs into the start_link/1 function directly

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for Supervisor.init/1.

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Callback implementation for Supervisor.init/1.

Link to this function

start_link(opts)