tailscale/types
Avery Pennarun 19c3e6cc9e types/logger: rate limited: more hysteresis, better messages.
- Switch to our own simpler token bucket, since x/time/rate is missing
  necessary stuff (can't provide your own time func; can't check the
  current bucket contents) and it's overkill anyway.

- Add tests that actually include advancing time.

- Don't remove the rate limit on a message until there's enough room to
  print at least two more of them. When we do, we'll also print how
  many we dropped, as a contextual reminder that some were previously
  lost. (This is more like how the Linux kernel does it.)

- Reformat the [RATE LIMITED] messages to be shorter, and to not
  corrupt original message. Instead, we print the message, then print
  its format string.

- Use %q instead of \"%s\", for more accurate parsing later, if the
  format string contained quotes.

Fixes #1772

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2021-04-30 01:01:15 -04:00
..
empty types/empty: add Message, stop using mysterious *struct{} 2020-02-14 13:35:49 -08:00
flagtype types/flagtype: fix bug showing the default port value (shown in --help) 2020-10-19 20:18:31 -07:00
ipproto net/packet, wgengine/filter: support SCTP 2021-03-20 21:34:13 -07:00
key wgengine/magicsock: stop depending on UpdateDst in legacy codepaths. 2021-01-14 12:56:48 -08:00
logger types/logger: rate limited: more hysteresis, better messages. 2021-04-30 01:01:15 -04:00
netmap types/netmap: remove some old TODOs 2021-04-18 19:30:13 -07:00
nettype wgengine/magicsock, tstest/natlab: start hooking up natlab to magicsock 2020-07-10 14:32:58 -07:00
opt types/opt: add Bool.EqualBool method 2020-06-25 19:14:24 -07:00
pad32 net/portmapper: add NAT-PMP client, move port mapping service probing 2021-02-23 09:07:38 -08:00
persist types/persist: split controlclient.Persist into a small leaf package 2021-02-05 15:25:33 -08:00
preftype types/preftype: don't use iota for consts persisted to disk 2021-04-02 09:02:54 -07:00
strbuilder types/strbuilder: add a variant of strings.Builder that uses sync.Pool 2020-05-25 08:50:48 -07:00
structs types/structs: add structs.Incomparable annotation, use it where applicable 2020-05-03 14:05:32 -07:00
wgkey types/wgkey: use value receiver with MarshalJSON 2021-04-29 14:14:34 -07:00