Repository navigation
Conversation
changed the way I'm handling env vars as default values were causing confusion
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRelocates the application entrypoint to Changes
Sequence Diagram(s)sequenceDiagram
participant Main as Processor Main
participant Config as Config Loader
participant Logger as Logger
participant Tracer as Tracer
participant Server as HTTP Server
participant Consumer as Event Consumer
participant Redpanda as Redpanda
participant Signals as OS Signals
Main->>Config: LoadProcessorConfig()
Config-->>Main: ProcessorConfig
Main->>Logger: NewLogger(service, level)
Logger-->>Main: slog.Logger
Main->>Tracer: InitTracer(ctx, name, endpoint)
Tracer-->>Main: shutdown func / err
Main->>Server: NewServer(addr)
Server-->>Main: *http.Server
Main->>Consumer: NewEventConsumer(brokers,...)
Consumer->>Redpanda: Connect & Subscribe(raw-events)
Main->>Server: Start (goroutine)
Main->>Consumer: Run(ctx) (goroutine)
Redpanda-->>Consumer: Event batches
Consumer->>Consumer: Unmarshal & process
Consumer->>Redpanda: Commit offsets
Signals->>Main: SIGTERM/SIGINT
Main->>Server: Graceful shutdown (SetNotReady, Shutdown)
Main->>Consumer: Close()
Main->>Tracer: Call shutdown()
Main-->>Main: Exit
sequenceDiagram
participant Client as HTTP Client
participant Server as HTTP Server
participant Health as Health Module
participant Ready as Ready State (atomic.Bool)
Client->>Server: GET /healthz
Server->>Health: Healthz()
Health-->>Client: 200 {"status":"ok"}
Client->>Server: GET /readyz
Server->>Health: Readyz()
Health->>Ready: check
Ready-->>Health: false
Health-->>Client: 503 {"status":"not ready"}
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
|



Summary by CodeRabbit
New Features
Chores
Tests