tailscale/clientupdate
Brad Fitzpatrick a8f3c861a4 util/progresstracking: add Ticker, NewWriter, and CountingWriter
Add three new helpers to the existing progresstracking package:

  - Ticker: spawns a 1 Hz goroutine that calls a report function with
    the current value of an atomic counter and a total. Returns a stop
    function (safe to call multiple times via sync.OnceFunc) that fires
    one final report and blocks until the goroutine exits.

  - NewWriter: wraps an io.Writer and calls onProgress at most once per
    interval with the cumulative byte count.

  - CountingWriter: an io.Writer that atomically counts bytes written,
    for use with Ticker.

These will be used by the appliance flash and OTA update code in
subsequent commits.

Updates #1866

Change-Id: If353cea6506f5351b6fb19bfdb7bc9b78fe7855e
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2026-07-01 10:02:05 -07:00
..
distsign util/progresstracking: add Ticker, NewWriter, and CountingWriter 2026-07-01 10:02:05 -07:00
testdata clientupdate: implement update for Unraid (#10344) 2023-11-28 13:28:30 -08:00
clientupdate_downloads.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
clientupdate_gokrazy.go util/progresstracking: add Ticker, NewWriter, and CountingWriter 2026-07-01 10:02:05 -07:00
clientupdate_not_downloads.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
clientupdate_notwindows.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
clientupdate_test.go cmd/tailscale/cli: add 'tailscale configure flash-appliance' 2026-07-01 08:09:50 -07:00
clientupdate_windows.go feature/clientupdate: windows update should use tailscale.exe update (#19438) 2026-04-17 10:28:35 -07:00
clientupdate.go cmd/tailscale/cli: add 'tailscale configure flash-appliance' 2026-07-01 08:09:50 -07:00