rebar3_midgard

Build and ship an Erlang worker from the Rebar3 workflow you already use. The plugin adds pack, inspect, and deploy under rebar3 midgard, while keeping route handling and application behavior in your Erlang project.

Project setup

Declare the Erlang SDK and project plugin in rebar.config:

{deps, [{midgard, {pkg, midgard_erlang, "0.2.0"}}]}.
{project_plugins, [{rebar3_midgard, "0.2.0"}]}.
{midgard, [
    {entry, my_worker},
    {function, handle},
    {protocol, "midgard.bytes.v1"}
]}.

When these Hex releases are available, Rebar3 will fetch the plugin and SDK from the project configuration; no Midgard repository checkout is needed.

Commands

rebar3 eunit
rebar3 midgard pack
rebar3 midgard inspect
rebar3 midgard deploy

Requirements

The plugin delegates artifact assembly and upload to Midgard's shared Mix archives, so the host also needs Elixir/Mix and the Packer and CLI archives. Install those once:

mix archive.install hex midgard_packer --force
mix archive.install hex midgard_cli --force

In repository development and tests, local _checkouts symlinks may provide the plugin and SDK. Published projects use the Hex dependencies declared in rebar.config.

See the Erlang example and project guide for a complete worker.