LemonCore.Runtime.Profile (lemon_core v0.1.0)

View Source

Runtime profiles for Lemon.

A profile is a named set of OTP applications that should be started together. Profiles replace the ad-hoc app lists that were hard-coded in bin/lemon.

Available profiles

ProfileAppsUse case
:runtime_mingateway, router, channels, control_plane, coding_agentCI, headless, embedded
:runtime_fullall of the above + automation, skills, web, sim_uiLocal development

Usage

profile = LemonCore.Runtime.Profile.get(:runtime_full)
profile.apps
# => [:lemon_gateway, :lemon_router, ...]

LemonCore.Runtime.Profile.app_list(:runtime_min)
# => [:lemon_gateway, :lemon_router, :lemon_channels, :lemon_control_plane]

Summary

Functions

Returns the list of OTP application names for the given profile.

Returns the default profile name for the current Mix environment.

Returns the profile struct for the given name.

Returns all available profile names.

Types

t()

@type t() :: %LemonCore.Runtime.Profile{
  apps: [atom()],
  description: String.t(),
  name: atom()
}

Functions

app_list(name)

@spec app_list(atom()) :: [atom()]

Returns the list of OTP application names for the given profile.

default_name()

@spec default_name() :: atom()

Returns the default profile name for the current Mix environment.

  • :dev and :test:runtime_full
  • :prod:runtime_min (can be overridden via LEMON_RUNTIME_PROFILE)

get(name)

@spec get(atom()) :: t()

Returns the profile struct for the given name.

Raises ArgumentError for an unknown profile name.

Examples

iex> LemonCore.Runtime.Profile.get(:runtime_full)
%LemonCore.Runtime.Profile{name: :runtime_full, ...}

names()

@spec names() :: [atom()]

Returns all available profile names.