OSchema-generated OpenRPC server for zinit process manager
- Rust 71.7%
- JavaScript 28.2%
- Makefile 0.1%
| schemas/zinit | ||
| sdk/js | ||
| src | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Makefile | ||
| README.md | ||
hero_zinit
OSchema-generated OpenRPC server for the zinit process manager.
Prerequisites
Zinit daemon must be running before starting hero_zinit:
# Start zinit via hero_zero
hero_zero run
# Or manually
~/hero/bin/zinit-server --config-dir ~/hero/cfg/zinit --socket ~/hero/var/zinit.sock &
Quick Start
make run
Server starts on http://localhost:9800
API
RPC endpoint: POST /api/{context}/zinit/rpc
The {context} can be any name (e.g., root, test, production):
# Using "root" context
curl -X POST http://localhost:9800/api/root/zinit/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"zinitservice.list","params":{}}'
# Using "test" context
curl -X POST http://localhost:9800/api/test/zinit/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"zinitservice.list","params":{}}'
# Get service status
curl -X POST http://localhost:9800/api/root/zinit/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"zinitservice.status","params":{"name":"myservice"}}'
Available Methods
| Method | Description |
|---|---|
zinitservice.ping |
Health check |
zinitservice.list |
List service names |
zinitservice.list_full |
List services with states |
zinitservice.status |
Get service status |
zinitservice.stats |
Get CPU/memory stats |
zinitservice.start |
Start a service |
zinitservice.stop |
Stop a service |
zinitservice.restart |
Restart a service |
zinitservice.logs |
Get service logs |
Development
make build # Build
make run # Run server
make check # Type check
make test # Run tests