diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2025-11-14 10:18:30 -0800 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2025-11-14 10:18:30 -0800 |
| commit | 5b0997536fa8ea9cbde7961e08bbe78378d0fde4 (patch) | |
| tree | 99ac1621342910b9f7c54bcc1ca80c179c0a2dd4 /types | |
| parent | 124301fbb651382959f8bfe9b1f1765e42e8a3ef (diff) | |
| download | tailscale-bradfitz/getstatus.tar.xz tailscale-bradfitz/getstatus.zip | |
wgengine, ipn/ipnlocal, wgengine/magicsock: remove RequestStatus, eventbus-ify thingsbradfitz/getstatus
Updates #17900
Change-Id: Ia53a3f195a82256d8f915c8928d8a775f723259d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'types')
| -rw-r--r-- | types/topics/topics.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/types/topics/topics.go b/types/topics/topics.go new file mode 100644 index 000000000..4080ad53b --- /dev/null +++ b/types/topics/topics.go @@ -0,0 +1,31 @@ +// Copyright (c) Tailscale Inc & AUTHORS +// SPDX-License-Identifier: BSD-3-Clause + +// Package topics defines event types used with the eventbus. +package topics + +import ( + "tailscale.com/tailcfg" + "tailscale.com/types/key" +) + +// DERPConnChange is published when the set of DERP connections changes. +type DERPConnChange struct { + RegionID int // DERP region ID + Connected bool // true for connected, false for disconnected + LiveDERPs int // total number of live DERP connections after this change +} + +// EndpointsChanged is published when magicsock's endpoints change. +type EndpointsChanged []tailcfg.Endpoint + +// TUNStatusChange is published when the TUN device goes up or down. +type TUNStatusChange struct { + Up bool // true if TUN is up, false if down +} + +// PeerRecvActivity is published periodically when a packet is received from a peer. +// This is called no more than once every 10 seconds per peer. +type PeerRecvActivity struct { + PeerKey key.NodePublic +} |
