Skip to content

Instantly share code, notes, and snippets.

@patrobinson
Created December 19, 2016 04:14
Show Gist options
  • Save patrobinson/4422a241d0e1164e6f29adbca0439269 to your computer and use it in GitHub Desktop.
Save patrobinson/4422a241d0e1164e6f29adbca0439269 to your computer and use it in GitHub Desktop.
defmodule DogStatsdSupervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok)
end
def init(:ok) do
children = [
worker(DogStatsd, [%{host: "localhost", port: 8125}, [name: DogStatsd]]),
]
supervise(children, strategy: :one_for_one)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment