rs-zero 0.1.1

Rust-first microservice framework inspired by go-zero engineering practices
Documentation
# Production adapters

rs-zero exposes production adapters through optional features while preserving a no-external-service default test path.

## Discovery

- `discovery-etcd` defines etcd v3 key/value codecs, lease/watch state helpers, and a registry facade.
- `discovery-kube` maps Kubernetes endpoint fixtures into `ServiceInstance` and exposes a discovery facade.

External service tests are ignored by default and should be run with Docker Compose or a real cluster.

## Observability

`rs-zero` has an OTLP traces configuration model and shutdown handle. The default build validates configuration without requiring a collector. Real transport dependencies are behind the `otlp` feature.

## Database and cache

- `db-sqlite` provides SQLx SQLite pool setup by default.
- `db-mysql` and `db-postgres` provide MySQL/PostgreSQL pool helpers, health checks, and transaction helper APIs.
- `cache` defines the async cache trait and in-memory backend.
- `cache-redis` provides Redis configuration, client factory, and a cache-store facade that keeps default tests offline.

## CLI generation

`rzcli model gen` supports:

```bash
rzcli model gen -s examples/model-cache/schema.sql -d target/generated --with-sqlx --with-redis-cache
rzcli model gen -s examples/model-cache/schema.sql -d target/generated --with-sqlx --sqlx-backend mysql
rzcli model gen -s tests/fixtures/postgres/model/user.sql -d target/generated --dialect postgres --with-sqlx
```

The generator emits skeletons only. MySQL generation uses `rs_zero::db::MySqlDatabasePool` when `--sqlx-backend mysql` is selected. PostgreSQL generation uses `rs_zero::db::PostgresDatabasePool` when `--dialect postgres --with-sqlx` is selected. Applications still own concrete database queries, Redis topology, credentials, and deployment configuration.

## Production checklist

Use [production-checklist.md](production-checklist.md) before enabling external adapters in a real environment. The checklist keeps default local verification separate from credentials, endpoints, health checks, timeout/backoff settings, and rollback decisions.