Skip to content

Commit

Permalink
Fix typos and improve language (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
preciz authored Aug 27, 2024
1 parent 0ff730e commit ab026af
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions lib/flame.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defmodule FLAME do
web requests, etc, to come to crawl. This is where folks typically reach for
FaaS or external service solutions, but FLAME gives you a better way.
Simply wrap your your existing code in a FLAME function and it will be executed
on a newly spawned, ephemeral node. Using Elixir and Erlang's built in distribution
Simply wrap your existing code in a FLAME function and it will be executed
on a newly spawned, ephemeral node. Using Elixir and Erlang's built-in distribution
features, entire function closures, including any state they close over, can be sent
and executed on a remote node:
Expand All @@ -49,7 +49,7 @@ defmodule FLAME do
## Pools
A `FLAME.Pool` provides elastic runner scaling, allowing a minimum and
maximum number of runners to be configured, and idle'd down as load decreases.
maximum number of runners to be configured, and idled down as load decreases.
Pools give you elastic scale that maximizes the newly spawned hardware.
At the same time, you also want to avoid spawning unbound resources. You also
Expand All @@ -68,10 +68,10 @@ defmodule FLAME do
]
Here we add a `FLAME.Pool` to our application supervision tree, configuring
a minimum of 0 and maximum of 10 runners. This acheives "scale to zero" behavior
a minimum of 0 and maximum of 10 runners. This achieves "scale to zero" behavior
while also allowing the pool to scale up to 10 runners when load increases.
Each runner in the case will be able to execute up to 5 concurrent functions.
The runners will shutdown after 30 seconds of inactivity.
The runners will shut down after 30 seconds of inactivity.
Calling a pool is as simple as passing its name to the FLAME functions:
Expand Down
4 changes: 2 additions & 2 deletions lib/flame/fly_backend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule FLAME.FlyBackend do
* `:entrypoint` – list strings for the entrypoint command
* `:exec` – list of strings for the exec command
* `:kernel_args` - list of strings
* `:swap_size_mb` – integer value in megabytes for th swap size
* `:swap_size_mb` – integer value in megabytes for the swap size
* `:tty` – boolean
* `:services` - The optional services to run on the machine. Defaults to `[]`.
Expand All @@ -60,7 +60,7 @@ defmodule FLAME.FlyBackend do
## Environment Variables
The FLAME Fly machines do *do not* inherit the environment variables of the parent.
The FLAME Fly machines *do not* inherit the environment variables of the parent.
You must explicit provide the environment that you would like to forward to the
machine. For example, if your FLAME's are starting your Ecto repos, you can copy
the env from the parent:
Expand Down
2 changes: 1 addition & 1 deletion lib/flame/local_backend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule FLAME.LocalBackend do

other ->
raise ArgumentError,
"expected a null arity function or {mod, func, args. Got: #{inspect(other)}"
"expected a null arity function or {mod, func, args}. Got: #{inspect(other)}"
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/flame/parent.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule FLAME.Parent do
* `:backend_vsn` - The FLAME backend version running on the parent.
* `:node_base` - The node basename the parent generated for the runner.
* `:host_env` - The environment variable name on the runner to use to
to lookup the runner's hostname for the runner's longname.
lookup the runner's hostname for the runner's longname.
"""

@flame_vsn Keyword.fetch!(Mix.Project.config(), :version)
Expand Down
4 changes: 2 additions & 2 deletions lib/flame/pool.ex
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ defmodule FLAME.Pool do
* `:count` - The number of runners the pool is attempting to grow to
* `:pid` - The pid of the async process that is booting the new runner
* `:on_grow_end` - The optional 2-arty function to be called when the pool growth process completes.
* `:on_grow_end` - The optional 2-arity function to be called when the pool growth process completes.
The 2-arity function receives either `:ok` or `{:exit, reason}`, and map with the following metadata:
* `:name` - The name of the pool
Expand Down Expand Up @@ -158,7 +158,7 @@ defmodule FLAME.Pool do
only the specific beam files will be synced on boot and for subsequent calls.
Defaults to `[]`.
* `:start_apps` – Either a boolean or a list of specific OTP applications names to start
* `:start_apps` – Either a boolean or a list of specific OTP application names to start
when the runner boots. When `true`, all applications currently running on the parent node
are sent to the runner node to be started. Defaults to `false`.
Expand Down

0 comments on commit ab026af

Please sign in to comment.