Files
daena/config/daena.yaml
T
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

48 lines
703 B
YAML

# daena configuration
# Path: /etc/daena/daena.yaml
data_dir: /var/lib/daena
log_dir: /var/log/daena
pid_file: /run/daena/daena.pid
logging:
level: info
format: json
api:
grpc:
host: 127.0.0.1
port: 8642
max_workers: 10
pipeline:
batch_size: 100
flush_interval: 5.0
max_queue_size: 10000
persistence:
backend: lmdb
lmdb:
path: /var/lib/daena/data
map_size: 104857600
max_databases: 16
sources:
- name: dummy
type: dummy
enabled: true
options:
interval: 5.0
message: "daena heartbeat"
processors:
- name: passthrough
type: passthrough
enabled: true
sinks:
- name: log
type: dummy
enabled: true
options: {}