BEAMNotify.env

You're seeing just the function env, go back to BEAMNotify module for more information.

Specs

env(pid() | binary() | atom() | keyword()) :: Enumerable.t()

Return the OS environment needed to call $BEAM_NOTIFY

This returns a map that can be passed directly to System.cmd/3 via its :env option.

This function can be passed different things based on what's convenient.

  1. If you're setting up child_spec's for a supervision tree and need the environment to pass in another child_spec, call this with the same options that you'd pass to start_link/1. This is a very common use.

  2. If you called start_link/1 manually and have the pid, call it with the pid.

  3. If you only have the name that was passed to start_link/1, then call it with the name. The name alone is insufficient for returning the $BEAM_NOTIFY_OPTIONS environment variable, so the BEAMNotify GenServer must be running. If you're in a chicken-and-egg situation where you're setting up a supervision tree, but it hasn't been started yet, see option 1.