OSchema-generated OpenRPC server for zinit process manager
  • Rust 71.7%
  • JavaScript 28.2%
  • Makefile 0.1%
Find a file
2026-02-17 12:31:41 +02:00
schemas/zinit first commit 2026-02-17 12:31:41 +02:00
sdk/js first commit 2026-02-17 12:31:41 +02:00
src first commit 2026-02-17 12:31:41 +02:00
.gitignore first commit 2026-02-17 12:31:41 +02:00
build.rs first commit 2026-02-17 12:31:41 +02:00
Cargo.lock first commit 2026-02-17 12:31:41 +02:00
Cargo.toml first commit 2026-02-17 12:31:41 +02:00
Makefile first commit 2026-02-17 12:31:41 +02:00
README.md first commit 2026-02-17 12:31:41 +02:00

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