MetadataPlugs.Info (metadata_plugs v0.3.3)

This plug provides the value of environment variables.

Options

The plug listens by default the /info endpoint. See opts/0 for more info.

Request

The configured endpoint should be called via an HTTP/GET request.

When this endpoint is called, the server responds with an HTTP 200 OK containing the value of all the configured environment variables. For example:

{"environment": "production", "version": 20190105}

Summary

Types

Plug options

Functions

Resolves an info request.

Types

opts()

@type opts() :: [path: String.t(), env_vars: [String.t()]]

Plug options:

  • env_vars: String list of environment variables names to get the value from, defaults to [].
  • path: The health endpoint path, defaults to /info.

Functions

call(conn, opts)

@spec call(Plug.Conn.t(), Plug.opts()) :: Plug.Conn.t()

Resolves an info request.