Skip to content

Commit

Permalink
Merge pull request #31 from wojtekmach/wm-docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
jeregrine committed Apr 22, 2024
2 parents a730739 + cb3ab10 commit 978515f
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/flame/fly_backend.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule FLAME.FlyBackend do
@moduledoc """
The `FLAME.Backend` using [Fly.io](https://fly.io) machines.
A `FLAME.Backend` using [Fly.io](https://fly.io) machines.
The only required configuration is telling FLAME to use the
`FLAME.FlyBackend` by default and the `:token` which is your Fly.io API
Expand Down
5 changes: 4 additions & 1 deletion lib/flame/local_backend.ex
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
defmodule FLAME.LocalBackend do
@moduledoc false
@moduledoc """
A `FLAME.Backend` useful for development and testing.
"""

@behaviour FLAME.Backend

@impl true
Expand Down
2 changes: 1 addition & 1 deletion lib/flame/parent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defmodule FLAME.Parent do
When booting a FLAME node, the `FLAME.Backend` is required to
export the `FLAME_PARENT` environment variable for the provisioned
instance. This value holds required information about the parent node
and can be set using the `FLAME.Parent.encode/3` function.
and can be set using the `encode/1` function.
"""
def get do
with {:ok, encoded} <- System.fetch_env("FLAME_PARENT"),
Expand Down
8 changes: 7 additions & 1 deletion lib/flame/pool.ex
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
defmodule FLAME.Pool.RunnerState do
@moduledoc false

defstruct count: nil, pid: nil, monitor_ref: nil
end

defmodule FLAME.Pool.WaitingState do
@moduledoc false

defstruct from: nil, monitor_ref: nil, deadline: nil
end

defmodule FLAME.Pool.Caller do
@moduledoc false

defstruct checkout_ref: nil, monitor_ref: nil, runner_ref: nil
end

defmodule FLAME.Pool do
@moduledoc """
Manages a pool of `FLAME.Runner`'s.
Manages a pool of `FLAME.Runner` processes.
Pools support elastic growth and shrinking of the number of runners.
Expand Down
2 changes: 2 additions & 0 deletions lib/flame/pool/supervisor.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
defmodule FLAME.Pool.Supervisor do
@moduledoc false

use Supervisor

def start_link(opts) do
Expand Down
2 changes: 2 additions & 0 deletions lib/flame/terminator.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
defmodule FLAME.Terminator.Caller do
@moduledoc false

defstruct from_pid: nil, timer: nil, placed_child_ref: nil, placed_caller_ref: nil, link?: false
end

Expand Down
2 changes: 2 additions & 0 deletions lib/flame/terminator/supervisor.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
defmodule FLAME.Terminator.Supervisor do
@moduledoc false

use Supervisor

def start_link(opts) do
Expand Down
22 changes: 17 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
defmodule FLAME.Runner.MixProject do
use Mix.Project

@source_url "https://github.com/phoenixframework/flame"
@version "0.1.12"

def project do
[
app: :flame,
version: "0.1.12",
version: @version,
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
source_url: "https://github.com/phoenixframework/flame",
docs: docs(),
homepage_url: "http://www.phoenixframework.org",
description: """
Treat your entire application as a lambda, where modular parts can be executed on short-lived infrastructure.
Expand All @@ -23,13 +26,23 @@ defmodule FLAME.Runner.MixProject do
maintainers: ["Chris McCord", "Jason Stiebs"],
licenses: ["MIT"],
links: %{
GitHub: "https://github.com/phoenixframework/flame"
GitHub: @source_url
},
files: ~w(lib CHANGELOG.md LICENSE.md mix.exs README.md)
]
end

# Run "mix help compile.app" to learn about applications.
defp docs do
[
source_url: @source_url,
source_ref: @version,
skip_code_autolink_to: [
"FLAME.Runner",
"FLAME.Terminator"
]
]
end

def application do
[
mod: {FLAME.Application, []},
Expand All @@ -40,7 +53,6 @@ defmodule FLAME.Runner.MixProject do
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]

# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:req, "~> 0.4.13"},
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%{
"castore": {:hex, :castore, "1.0.6", "ffc42f110ebfdafab0ea159cd43d31365fa0af0ce4a02ecebf1707ae619ee727", [:mix], [], "hexpm", "374c6e7ca752296be3d6780a6d5b922854ffcc74123da90f2f328996b962d33a"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"ex_doc": {:hex, :ex_doc, "0.31.2", "8b06d0a5ac69e1a54df35519c951f1f44a7b7ca9a5bb7a260cd8a174d6322ece", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "317346c14febaba9ca40fd97b5b5919f7751fb85d399cc8e7e8872049f37e0af"},
"ex_doc": {:hex, :ex_doc, "0.32.1", "21e40f939515373bcdc9cffe65f3b3543f05015ac6c3d01d991874129d173420", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5142c9db521f106d61ff33250f779807ed2a88620e472ac95dc7d59c380113da"},
"finch": {:hex, :finch, "0.18.0", "944ac7d34d0bd2ac8998f79f7a811b21d87d911e77a786bc5810adb75632ada4", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "69f5045b042e531e53edc2574f15e25e735b522c37e2ddb766e15b979e03aa65"},
"hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
Expand Down

0 comments on commit 978515f

Please sign in to comment.