ICEQ API & Rabbit Event Listener. It listens to RabbitMQ queue with all routing "iceq.task.v1.#" It adds events to DB and list DB on endpoints.
Generate Ent files from schema
make generate-ent
Setup: Load Envs and create 2 containers (Rabbit, Postgres)
make env-dev-setup
Start API:
make run-dev-api
Before you start API you need to set up Minikube for IceQ:
Start API:
make run-minikube-api
| Message | API status |
|---|---|
| iceq.task.v1.<task_name>.run | scheduled |
| iceq.task.v1.<task_name>.status.created | created |
| iceq.task.v1.<task_name>.status.pending | pending |
| iceq.task.v1.<task_name>.status.started | running |
| iceq.task.v1.<task_name>.status.succeeded | succeeded |
| iceq.task.v1.<task_name>.status.errored | error |
| iceq.task.v1.<task_name>.status.failed | failed |
Check Health endpoint (default port is 22040)
http://0.0.0.0:22040/health
Debug:
. env-dev.sh
go run _debug/main.go
This should send msg to rabbitmq queue. Task_x should be visible at
http://0.0.0.0:22040/tasks
TaskRuns of Task_x are visible at
http://0.0.0.0:22040/tasks/1/runs
details of task we just send (assuming its ID=1)
http://0.0.0.0:22040/tasks/1/runs/1
file endpoints/task_handler
make integration-test-dockeredapi