Skip to content

API Reference

To understand how the Relay works under the hood, you can explore the documentation for each package. The project is organized into modular components:

  • Directorycmd/
    • cli : Command-line tools for managing the outbox.
    • producer : Example event producer.
    • relay : The main service entry point.
  • Directoryinternal/
    • config : Environment and app configuration.
    • container : Dependency injection and lifecycle.
    • publishers : Kafka and NATS implementations.
    • relay : Core orchestration and worker loops.
    • storage : Database drivers and event claiming.
    • telemetry : Metrics and OpenTelemetry tracing.

Event Delivery

Explore internal/publishers to understand how the Relay handles delivery across different brokers.

High-Concurrency Claiming

Dive into internal/storage to see the PostgreSQL query logic that powers worker synchronization.

Core Orchestration

Visit internal/relay to understand the main worker loop, backoff strategies, and state machines.

System Observability

Review internal/telemetry to see how we track health, metrics, and distributed tracing.