tailscale/clientupdate/distsign
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
..
roots clientupdate/distsign: add new prod root signing key to keychain 2023-10-11 09:20:17 -07:00
distsign_test.go cmd/vet: add subtestnames analyzer; fix all existing violations 2026-04-05 15:52:51 -07:00
distsign.go util/progresstracking: add Ticker, NewWriter, and CountingWriter 2026-07-01 10:02:05 -07:00
roots_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
roots.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
url.go cmd/tailscale/cli: add 'tailscale configure flash-appliance' 2026-07-01 08:09:50 -07:00