https://github.com/tyalt1/auto_ex
An event-driven automation framework for Elixir.
https://github.com/tyalt1/auto_ex
elixir elixir-library elixir-programming-language
Last synced: 7 months ago
JSON representation
An event-driven automation framework for Elixir.
- Host: GitHub
- URL: https://github.com/tyalt1/auto_ex
- Owner: tyalt1
- Created: 2018-03-07T18:27:52.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-09T20:53:47.000Z (over 7 years ago)
- Last Synced: 2025-03-11T10:19:48.417Z (12 months ago)
- Topics: elixir, elixir-library, elixir-programming-language
- Language: Elixir
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AutoEx
An event-driven automation framework for Elixir.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `auto_ex` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:auto_ex, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/auto_ex](https://hexdocs.pm/auto_ex).
## Documentation
### Signal
A signal is an event that triggers all actions linked to it.
```elixir
alias AutoEx.Signal
{:ok, pid} = Signal.start_link()
Signal.run(pid)
```
### Action
An action is a stand alone function.
```elixir
alias AutoEx.Action
action = Action.new(fn -> IO.puts "Performing action!" end)
Action.run(action)
```
### Link Signal with Actions
When an action is added to a signal, it is run whenever the signal is.
```elixir
alias AutoEx.{Signal, Action}
{:ok, signal} = Signal.start_link()
action = Action.new(fn -> IO.puts "Performing action!" end)
Signal.add_action(signal, action)
Singal.run(signal)
```
### Resource
Advantages on Resource:
- crud semantics
- persistance
## TODO
- Tests!
- Action retry
- Logging when signal is fired
- Logging when action is executed (successful/failure)
- persistance for resource
- documenting resource