Skip to content
/ auto_ex Public

An event-driven automation framework for Elixir.

Notifications You must be signed in to change notification settings

tyalt1/auto_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoEx

An event-driven automation framework for Elixir.

Installation

If available in Hex, the package can be installed by adding auto_ex to your list of dependencies in mix.exs:

def deps do
  [
    {:auto_ex, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/auto_ex.

Documentation

Signal

A signal is an event that triggers all actions linked to it.

alias AutoEx.Signal

{:ok, pid} = Signal.start_link()
Signal.run(pid)

Action

An action is a stand alone function.

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.

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

About

An event-driven automation framework for Elixir.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages