Microservice / Event-Driven System Coder

作者:promptpacks发布日期:2026-09-21观看:25

Scaffolds an event-driven service with outbox, schema registry, contracts, and observability — keeps services loosely coupled.

01/ 01

Build a new microservice "{{SERVICE_NAME}}" in {{Go/Java/Node}} with: - Domain: {{responsibilities, and explicitly what it does NOT own}}. - Transport: gRPC for sync (protobuf v3, buf-managed), Kafka for domain events (Avro + schema registry, topic/partition/key strategy). - Persistence: {{PostgreSQL}}; transactions + transactional outbox; migrations. - API contract review before code; consumer-driven contract tests (Pact). - Observability: OpenTelemetry traces (propagate via Kafka headers), structured logs with trace_id, Prometheus RED metrics + business metrics, health/readiness. - Resilience: bounded queues, bulkhead, circuit breaker, deadlines (not infinite timeouts), graceful drain on SIGTERM with in-flight handling. - Config: 12-factor, env per environment, feature flags, no secrets in repo. - Deliver Dockerfile (distroless, multi-stage, non-root), Helm chart, GitHub Actions CI (lint/test/contract/build/SBOM/sign), and a runbook (SLOs, alerts, dashboards, common incidents). Output proto/contract first for approval. ================================================================================

自动翻译

自动翻译中…

🔥热搜词

评论0

登录后参与评论

还没有评论,来抢沙发吧