golib/go.work
AJ ONeal 11743c9a10
feat(sync/dataset): minimal group/view/fetcher for hot-swap refresh
Distilled from the previous net/dataset experiment and the inline
closure version in check-ip. Keeps what actually earned its keep:

  - Group ties one Fetcher to N views; a single Load drives all swaps,
    so shared sources (one git pull, one zip download) don't get
    re-fetched per view.
  - View[T].Value() is a lock-free atomic read; the atomic.Pointer is
    hidden so consumers never see in-flight reloads.
  - Tick runs Load on a ticker with stderr error logging.

Dropped from the v1 design: MultiSyncer (callers fan-out inline when
needed), Close (unused outside geoip), Name (callers wrap the logger),
standalone Dataset type (Group with one view covers it), Sync vs Init
asymmetry (Load handles first-call vs update internally).

check-ip rewires to use it — file/git/http modes all build a Group
with two views, uniform shape.
2026-04-20 13:33:05 -06:00

22 lines
579 B
Plaintext

go 1.26.1
use (
.
./cmd/check-ip
./net/formmailer
./net/geoip
./net/gitshallow
./net/httpcache
./net/ipcohort
./sync/dataset
)
replace (
github.com/therootcompany/golib/net/formmailer v0.0.0 => ./net/formmailer
github.com/therootcompany/golib/net/geoip v0.0.0 => ./net/geoip
github.com/therootcompany/golib/net/gitshallow v0.0.0 => ./net/gitshallow
github.com/therootcompany/golib/net/httpcache v0.0.0 => ./net/httpcache
github.com/therootcompany/golib/net/ipcohort v0.0.0 => ./net/ipcohort
github.com/therootcompany/golib/sync/dataset v0.0.0 => ./sync/dataset
)