Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fullpipe/trigon
Trigon connects to MySQL bin-log stream and processes it with different pipes
https://github.com/fullpipe/trigon
mysql mysql-triggers pipes triggers
Last synced: about 4 hours ago
JSON representation
Trigon connects to MySQL bin-log stream and processes it with different pipes
- Host: GitHub
- URL: https://github.com/fullpipe/trigon
- Owner: fullpipe
- License: mit
- Created: 2021-01-22T11:41:43.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-04T10:35:00.000Z (over 3 years ago)
- Last Synced: 2024-06-20T05:13:43.236Z (5 months ago)
- Topics: mysql, mysql-triggers, pipes, triggers
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# trigon
Trigon connects to MySQL bin-log stream and processes it with different pipes
## Install
```bash
go get -u github.com/fullpipe/trigon
```## Usage
```bash
trigon -config=trigon.yaml
```## Configuration with examples
```yaml
# trigon.yaml
input:
host: 127.0.0.1:3320 # mysql host
user: root
password: root
triggers:
- name: "Post webhook after 1000 user creations"
pipes:
- ["table_filter", ["user"]]
- ["action_filter", ["insert"]]
- ["every", 1000]
- ["debounce", 5000]
- ["webhook", { url: https://hookb.in/mZaZlXYLpjueqq710Ypk, method: POST }]- name: "Start data aggregation on leads updates"
pipes:
- ["table_filter", ["lead"]]
- ["action_filter", ["insert", "update"]]
- ["every", 10000]
- ["debounce", 3600000] # debounce for one hour
- ["log", { prefix: "Calculate leads aggregation" }]
- ["amqp", { dsn: "amqp://guest:guest@localhost:5672/", exchange: "lead", routing_key: "lead.aggregate" }]- name: "Try every pipe on transactions"
pipes:
- ["log", { prefix: "All in one start: ", output: "file", "path": "./log.log" }]
- ["table_filter", ["transaction"]]
- ["action_filter", ["insert", "update", "delete"]]
- ["every", 2]
- ["debounce", 5000]
- ["webhook", { url: https://hookb.in/mZaZlXYLpjueqq710Ypk, method: POST }]
- ["amqp", { dsn: "amqp://guest:guest@localhost:5672/", exchange: "test1", routing_key: "order" }]
- ["log", { prefix: "All in one end: " }]
```## TODO
- [x] yaml config
- [x] input
- [x] triggers
- [x] pipes
- [x] output
- [ ] tests
- [ ] pipes
- [x] log
- [ ] formats
- [x] action filter
- [x] table filter
- [x] every nth
- [x] debounce
- [x] amqp
- [x] webhook
- [ ] auth
- [ ] expr filter, use https://github.com/antonmedv/expr for filtering