• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / dot-block / 29212142617
62%

Build:
DEFAULT BRANCH: main
Ran 12 Jul 2026 10:46PM UTC
Jobs 1
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jul 2026 10:45PM UTC coverage: 62.632% (+0.5%) from 62.134%
29212142617

push

github

web-flow
feat: add real-time DNS request streaming via SSE (#190)

* feat: add real-time DNS request streaming via SSE

Introduced an administrative `/api/events` endpoint that streams live
DNS
request data—including domain, client IP, source, blocking status, and
GeoIP info—using Server-Sent Events (SSE).

```mermaid
sequenceDiagram
    participant C as DNS Client
    participant D as Dispatcher
    participant B as Broadcaster
    participant A as Admin API (/api/events)

    C->>D: DNS Request
    D->>D: Process Request
    D->>B: Broadcast Snapshot
    A->>B: Subscribe
    B-->>A: Stream Event (JSON)
```

- Added `sse.Broadcaster` to manage client connections.
- Integrated `Broadcaster` into `DNSDispatcher` to stream snapshots.
- Updated `RequestSnapshot` to track domain and status metadata.
- Added `/api/events` route to the Admin API group.

* test: update SSE broadcaster initialization in tests

Pass a logger instance to `sse.NewBroadcaster` across test files to
satisfy updated constructor dependencies and ensure consistent logging
during test execution.

* Update internal/http/routes/routes.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update internal/forwarder/dispatcher.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix: handle channel closure in SSE broadcaster

Ensures the SSE stream properly terminates when the subscriber channel
is closed, preventing potential panics or blocked goroutines during
client disconnection.

```mermaid
sequenceDiagram
    participant Client
    participant SSEHandler
    participant Broadcaster

    Broadcaster->>SSEHandler: Send message
    SSEHandler->>Client: Flush to connection
    Note over Broadcaster, SSEHandler: Channel closed
    Broadcaster--xSSEHandler: !ok detected
    SSEHandler->>SSEHandler: Terminate loop
```

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-a... (continued)

77 of 101 new or added lines in 5 files covered. (76.24%)

1599 of 2553 relevant lines covered (62.63%)

692.03 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
37.66
-13.25% internal/http/routes/routes.go
2
84.89
0.49% internal/forwarder/dispatcher.go
1
96.88
internal/http/sse/broadcaster.go
Jobs
ID Job ID Ran Files Coverage
1 29212142617.1 12 Jul 2026 10:46PM UTC 38
62.63
GitHub Action Run
Source Files on build 29212142617
  • Tree
  • List 38
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a9e1d1ed on github
  • Prev Build on main (#29209548360)
  • Next Build on main (#29264584838)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc