Managoat.Sandbox.Config (managoat_sandbox v0.1.0)

Copy Markdown View Source

Per-adapter settings, read from this library's own otp_app.

Each adapter keeps its settings under its module name:

config :managoat_sandbox, Managoat.Sandbox.Sprites,
  token: System.get_env("SPRITES_TOKEN"),
  base_url: "https://api.sprites.dev",
  timeout_ms: 30_000

config :managoat_sandbox, Managoat.Sandbox.E2B, api_key: ..., template: "base"
config :managoat_sandbox, Managoat.Sandbox.Daytona, api_key: ..., snapshot: nil
config :managoat_sandbox, Managoat.Sandbox.Retry, base_ms: 250

The host application decides where a value comes from (an environment variable, a secrets store); the library reads nothing but :managoat_sandbox. A key set to nil counts as unset and yields the default, so a host may write every key unconditionally from its environment.

Summary

Functions

The value of key in scope's settings, or default when unset or nil.

Functions

get(scope, key, default \\ nil)

@spec get(module(), atom(), term()) :: term()

The value of key in scope's settings, or default when unset or nil.