Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: ed4adc463a
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (32 sloc) 0.948 kB
%% This Source Code Form is subject to the terms of
%% the Mozilla Public License, v. 2.0.
%% A copy of the MPL can be found in the LICENSE file or
%% you can obtain it at http://mozilla.org/MPL/2.0/.
%%
%% @author Brendan Hay
%% @copyright (c) 2012 Brendan Hay <brendan@soundcloud.com>
%% @doc
%%
-module(stetson_sup).
-behaviour(supervisor).
-include("include/stetson.hrl").
%% API
-export([start_link/2]).
%% Callbacks
-export([init/1]).
%%
%% API
%%
-spec start_link(string(), string()) -> {ok, pid()} | ignore | {error, _}.
%% @doc
start_link(Uri, Ns) ->
supervisor:start_link({local, ?MODULE}, ?MODULE, [Uri, Ns]).
%%
%% Callbacks
%%
-spec init([string()]) -> {ok, {{one_for_all, pos_integer(), pos_integer()}, [supervisor:child_spec()]}}.
%% @hidden
init([Uri, Ns]) ->
Spec = {stats, {stetson_server, start_link, [Uri, Ns]},
permanent, 2000, worker, [stetson_server]},
{ok, {{one_for_all, 100, 1}, [Spec]}}.
Jump to Line
Something went wrong with that request. Please try again.