Files
ahp 4da9accabf feat: replace REST API with gRPC service
Complete migration from FastAPI/HTTP to gRPC:

Proto definition (proto/daena/v1/daena.proto):
- Daena service with 9 RPCs: GetStatus, GetHealth, GetConfig,
  ListPlugins, GetQueueState, ListPendingRecords, ListDeadRecords,
  ListSinks, ReloadConfig
- Messages for all request/response types with proper field types

gRPC server (src/daena/api/grpc_server.py):
- Async gRPC aio server with DaenaServicer implementation
- DaenaGRPCServer with start/stop/serve_forever lifecycle
- All endpoints delegate to DaenaRuntime

gRPC client (src/daena/cli/main.py):
- CLI now uses grpc.insecure_channel + DaenaStub
- Same commands: status, health, queue, sinks, plugins, config, version

Config changes:
- Remove FastAPI/uvicorn/http config, replace with grpc config
- GRPCConfig with host/port/max_workers

Dependency changes:
- Remove fastapi, uvicorn, starlette, anyio
- Add grpcio, grpcio-tools, protobuf
- Keep httpx for HTTP sink forwarding (separate from management API)

Tests:
- 8 new gRPC integration tests (test_grpc.py)
- All 31 tests passing, ruff clean
2026-07-15 10:48:18 +03:30

31 lines
557 B
Desktop File

[Unit]
Description=Daena - Linux log and event collector
Documentation=https://github.com/anomalyco/daena
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=daena
Group=daena
ExecStart=/usr/local/bin/daena-serve
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5
NoNewPrivileges=true
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
StateDirectory=daena
LogsDirectory=daena
RuntimeDirectory=daena
# Environment
Environment=DAENA_CONFIG_PATH=/etc/daena/daena.yaml
[Install]
WantedBy=multi-user.target