https://github.com/benhid/go-worker
Run jobs in containers.
https://github.com/benhid/go-worker
docker golang runner task-runner worker
Last synced: 3 months ago
JSON representation
Run jobs in containers.
- Host: GitHub
- URL: https://github.com/benhid/go-worker
- Owner: benhid
- License: mit
- Created: 2022-04-25T13:39:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T13:45:30.000Z (about 3 years ago)
- Last Synced: 2025-01-30T05:42:03.171Z (4 months ago)
- Topics: docker, golang, runner, task-runner, worker
- Language: Go
- Homepage:
- Size: 118 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## worker 🍱
[](https://github.com/benhid/go-worker/actions/workflows/ci.yml)
[](https://goreportcard.com/report/github.com/benhid/go-worker)
[](LICENSE)Run jobs using containerized functions. The worker keeps a pool of warm containers to reduce overhead, so new job are executed as they arrive.
Code execution is handled by the [agent](https://github.com/benhid/go-agent).

## Get started
### Build
```bash
go build -v
```### Run
Start worker with:
```bash
./worker [-listen ":8090"] [-image "hello-python"] [-min-size 10]
```### Usage
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"ID": "1", "Payload": "hello world"}' \
http://0.0.0.0:8090/run
```