dumpster v1.0.1 Dumpster View Source
Simple Binary dumps.
Usage
Add Dumpster as a dependency in your mix.exs:
defp deps() do
[
{:dumpster, "~> 1.0.0"}
]
end
Either add Dumpster to your applications in mix.exs:
defp application do
[
mod: {MyApp, []},
extra_applications: [
:dumpster
]
]
or start it manually by adding it in an Supervision tree:
defmodule MyApp.Supervisor do
use Supervisor
def start_link(args \\ []) do
[
{Dumpster, []}
]
|> Supervisor.start_link(build_children(), strategy: :one_for_one)
end
end
Configuration
Options are:
:paththe folder in which the dumps are saved, defaults to the Application dir.:formatan EEx template String. Available parameters are@unix @year @month @day @hour @minute @second, defaults to"dump_<%= @unix %>". File extensions are added as needed.:compressediftruefiles are compressed with gzip.
Dumpster can be configured either by using the config files or during runtime via the arguments.
Link to this section Summary
Functions
Dumps the payload and returns it, resulting in a Plug-like behaviour
Opens and fetches all dumps from the given file
Link to this section Functions
Dumps the payload and returns it, resulting in a Plug-like behaviour.
iex> bin = <<1, 2, 3, 4, 5>> <<1, 2, 3, 4, 5>> iex> ^bin = Dumpster.dump(bin) <<1, 2, 3, 4, 5>>
Opens and fetches all dumps from the given file.