|
|
|
@ -5,30 +5,6 @@ defmodule Explorer.Indexer do |
|
|
|
|
|
|
|
|
|
alias Explorer.Chain |
|
|
|
|
|
|
|
|
|
@doc """ |
|
|
|
|
Options passed to `child_spec` are passed to `Explorer.Indexer.Supervisor.start_link/1` |
|
|
|
|
|
|
|
|
|
iex> Explorer.Indexer.child_spec([option: :value]) |
|
|
|
|
%{ |
|
|
|
|
id: Explorer.Indexer, |
|
|
|
|
restart: :permanent, |
|
|
|
|
shutdown: 5000, |
|
|
|
|
start: {Explorer.Indexer.Supervisor, :start_link, |
|
|
|
|
[[option: :value]]}, |
|
|
|
|
type: :supervisor |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
""" |
|
|
|
|
def child_spec(opts) do |
|
|
|
|
%{ |
|
|
|
|
id: __MODULE__, |
|
|
|
|
start: {Explorer.Indexer.Supervisor, :start_link, [opts]}, |
|
|
|
|
restart: :permanent, |
|
|
|
|
shutdown: 5000, |
|
|
|
|
type: :supervisor |
|
|
|
|
} |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
@doc """ |
|
|
|
|
The maximum `t:Explorer.Chain.Block.t/0` `number` that was indexed |
|
|
|
|
|
|
|
|
|