Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nerdyworm/eventlog
Dynamodb event log and stream consumer for elixir
https://github.com/nerdyworm/eventlog
Last synced: 26 days ago
JSON representation
Dynamodb event log and stream consumer for elixir
- Host: GitHub
- URL: https://github.com/nerdyworm/eventlog
- Owner: nerdyworm
- Created: 2018-01-20T19:00:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-03T01:48:11.000Z (over 5 years ago)
- Last Synced: 2024-02-13T09:11:11.496Z (10 months ago)
- Language: Elixir
- Size: 25.4 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-elixir-cqrs - Eventlog - A simple event log backed by dynamodb and dynamodb streams. (Libraries)
README
# Eventlog
A simple event log backed by dynamodb and dynamodb streams.
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `eventlog` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:eventlog, "~> 0.1.0"}
]
end
```## Eventlog
```elixir
config :eventlog, table: "table_name"
``````elixir
:ok = Eventlog.append("xxxx-xxxx-xxxx-xxxx", %YourEventHere{})
```### Setup Eventlog tables
```sh
:ok = Eventlog.setup
```## Consumers
```elixir
defmodule Consumer do
use Eventlog.Consumerdef handle_records(events) do
:ok
end
end
``````elixir
config :eventlog, Consumer, table: "consumer_leases_table_name"
```### Setup consumer tables
```sh
mix run "Consumer.setup"
```