New crates: - mytheclipse-queue: unified job queue with WorkerPool, retry/backoff, DLQ Backends: in-memory (default), Redis, NATS, PostgreSQL - mytheclipse-tracing: tracing subscriber layers with env filter + OTLP/Jaeger export - mytheclipse-http: HTTP client/server with timeout + tracing, axum server - mytheclipse-cli: CLI framework with clap derive, built-in subcommands Enhancements to existing crates: - mytheclipse-core: SemaphorePool, LeaderElection, HealthRegistry/HealthCheck - mytheclipse-cache: AutoRefreshCache (bg refresh on miss), CacheMetrics - mytheclipse-config: ConfigSchema for JSON Schema generation - mytheclipse-storage: MultipartUploadDriver trait - mytheclipse-crypto: PASETO v4.local token support All features compile with --all-features; tests + clippy pass clean.
2.6 KiB
2.6 KiB
Implementation Spec: New Features for mytheclipse
Status: COMPLETE
Summary
Added 4 new crates and enhancements to existing crates to expand mytheclipse's
abstraction layer coverage. All code compiles with cargo build --workspace --all-features,
all tests pass, and clippy is clean.
New Crates
-
mytheclipse-queue (
crates/mytheclipse-queue/)Queuetrait: enqueue, dequeue, ack, nack, dlq_move, lenJob/JobIdtypes with payload + metadataWorkerPoolwith configurable concurrency, retry/backoff, dead-letter queueJobHandlertrait for processing jobs- Backend: in-memory (default), Redis (feature
redis), NATS (featurenats), PostgreSQL (featurepostgres)
-
mytheclipse-tracing (
crates/mytheclipse-tracing/)TracingLayerwith env-filter support and subscriber builderOtelLayerfor OTLP/Jaeger export (featureotel,jaeger,full)- Features:
env(default),otel,jaeger,full
-
mytheclipse-http (
crates/mytheclipse-http/)HttpClientwrapping reqwest with timeout + tracing instrumentationHttpServer(axum) with health endpoint + graceful shutdown- Features:
client(default),server-axum,server-hyper
-
mytheclipse-cli (
crates/mytheclipse-cli/)CliApp/CliBuilderwith clap derive- Subcommands:
serve,worker,migrate,health,version - Feature:
clap-derive(default)
Enhancements to Existing Crates
mytheclipse (core)
pool.rs:SemaphorePool<T>withPooltrait,Pooled<T>RAII permithealth.rs:HealthRegistry,HealthChecktrait,HealthStatusenumleader.rs:LeaderElectiontrait,InProcLeaderElectionimpl- Features: gated under
traffic(pool) andlifecycle(health, leader)
mytheclipse-cache
auto_refresh.rs:AutoRefreshCache— background refresh on cache missmetrics.rs:CacheMetrics+CacheSnapshotwith hit/miss/eviction tracking- Added
tokiooptional dep (used by cache-aside + auto-refresh)
mytheclipse-config
schema.rs:ConfigSchema+PropertySchemafor JSON Schema generation- Feature
schemagated
mytheclipse-storage
multipart.rs:MultipartUploadDrivertrait +MultipartUploadhandler- Feature
multipart(default) gated
mytheclipse-crypto
paseto.rs:PasetoSigner+PasetoClaimsfor PASETO v4.local tokens- Features
pasetoandrate-limitadded
Verification
cargo build --workspace --all-features✓cargo test --workspace --all-features✓ (all pass, 1 ignored doctest)cargo clippy --workspace --all-features✓ (no warnings)