MuonTrap.Options (muontrap v1.0.0) View Source

Validate and normalize the options passed to MuonTrap.cmd/3 and MuonTrap.Daemon.start_link/3

This module is generally not called directly, but it's likely the source of exceptions if any options aren't quite right. Call validate/4 directly to debug or check options without invoking a command.

Link to this section Summary

Types

t()

The following fields are always present

Functions

Validate options and normalize them for invoking commands

Link to this section Types

Specs

t() :: map()

The following fields are always present:

  • :cmd - the command to run
  • :args - a list of arguments to the command

The next fields are optional:

Link to this section Functions

Link to this function

validate(context, cmd, args, opts)

View Source

Specs

validate(:cmd | :daemon, binary(), [binary()], keyword()) :: t()

Validate options and normalize them for invoking commands

Pass in :cmd or :daemon for the first parameter to allow function-specific options.