aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_transfer.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2026-06-12 08:55:05 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2026-06-12 08:55:05 -0700
commit4912c3a7c20d765692993f6caaa98a94f5ae28cb (patch)
treef2944e4c1bd72c38d3ad90713200e0984d2ca3fc /hotline/file_transfer.go
parentc15f8510fbd5ccf9a122f88d6e975d1ef69e00b3 (diff)
Add Reloader interface to remove type assertions from reload path
main.go's reloadFunc reached through the server's interface fields with concrete type assertions (srv.MessageBoard.(*mobius.FlatNews), etc.) to trigger SIGHUP/API reloads, leaking storage implementation details past the manager interfaces. Storage backends now implement a one-method Reloader interface, with compile-time assertions for FlatNews, BanFile, ThreadedNewsYAML, and Agreement. BanFile.Load and ThreadedNewsYAML.Load are renamed Reload for a uniform method set, matching FlatNews's existing convention of using Reload for the initial load as well. main.go registers each backend in a named reloader list as it is constructed, and reloadFunc iterates the list. The banner reload is a ReloaderFunc that also performs the initial load, and the Redis-backed ban list simply registers no reloader, replacing the old type-switch special case.
Diffstat (limited to 'hotline/file_transfer.go')
0 files changed, 0 insertions, 0 deletions