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

rm-hull / dot-block / 20777708141
43%

Build:
DEFAULT BRANCH: main
Ran 07 Jan 2026 10:03AM UTC
Jobs 1
Files 18
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

07 Jan 2026 10:03AM UTC coverage: 42.546% (-1.4%) from 43.964%
20777708141

push

github

web-flow
feat: Add /reload HTTP endpoint for blocklist (#63)

* feat: Add /reload HTTP endpoint for blocklist

Introduce a new HTTP endpoint `/reload` which allows users to
manually trigger an immediate update of the configured blocklists.

*   Exposes `BlocklistUpdater` to the HTTP server setup.
*   The `/reload` endpoint is protected by the same basic
    authentication configured for `/metrics`.
*   The handler returns HTTP 200 OK after running the update.
```mermaid
sequenceDiagram
    actor U as User
    participant H as HTTP Server
    participant B as BlocklistUpdater

    U->>H: GET /reload (Authenticated)
    H->>B: NewHandler().ServeHTTP()
    B->>B: Run() (Fetches and loads blocklists)
    B-->>H: Update finished
    H-->>U: HTTP 200 OK
```

* refactor: Make blocklist update asynchronous

The blocklist update process is now executed asynchronously.

This prevents the API handler from blocking while waiting for the
update to complete. The response status is changed from `200 OK`
to `202 Accepted` to signify that the reload was triggered but
is running in the background.

* refactor: Rename BlocklistUpdater constructor

Renames `NewBlocklistUpdaterCronJob` to `NewBlocklistUpdater`.

The explicit use of the `CronJob` suffix in the constructor name
was redundant, as the updater structure is utilized both for
scheduled cron jobs and manual HTTP handler triggers.

Also includes a minor style fix for JSON response alignment.
*   Update JSON alignment in `BlocklistUpdater.NewHandler`.
*   Replace references in `internal/app.go`.

0 of 19 new or added lines in 2 files covered. (0.0%)

24 existing lines in 2 files now uncovered.

488 of 1147 relevant lines covered (42.55%)

0.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
8
0.0
0.0% internal/app.go
11
0.0
0.0% internal/blocklist/update.go

Uncovered Existing Lines

Lines Coverage ∆ File
4
0.0
0.0% internal/blocklist/update.go
20
0.0
0.0% internal/app.go
Jobs
ID Job ID Ran Files Coverage
1 20777708141.1 07 Jan 2026 10:03AM UTC 18
42.55
GitHub Action Run
Source Files on build 20777708141
  • Tree
  • List 18
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 47cf75a4 on github
  • Prev Build on main (#20776925472)
  • Next Build on main (#20790969946)
  • 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