mirror

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mirror serves the ClamAV database mirror to freshclam: the database files that cvdupdate keeps in one directory, the YARA rules from another, and a health check. It replaces a general web server with the little that freshclam needs: GET and HEAD on single files, with If-Modified-Since and Range requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(dbDir, rulesDir string, log *slog.Logger) http.Handler

Handler returns the mirror's HTTP handler:

/healthz        200 "ok"
/rules/<name>   a file in rulesDir (empty: no rules)
/<name>         a file in dbDir

Only regular files directly in a directory are served, no listings, no subdirectories and no names starting with a dot (cvdupdate's state, the "..data" link of a Kubernetes volume). Symbolic links are followed only as long as they stay inside their directory. The directories may appear after the start: until cvdupdate has created dbDir, every file is 404.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL