mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-09 01:27:42 +00:00
ipn: declare NotifyWatchOpt consts without using iota
Updates #cleanup Updates #1909 (noticed while working on that) Change-Id: I505001e5294287ad2a937b4db61d9e67de70fa14 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
36ea792f06
commit
2fb361a3cf
@ -58,23 +58,29 @@ type EngineStatus struct {
|
|||||||
// to subscribe to.
|
// to subscribe to.
|
||||||
type NotifyWatchOpt uint64
|
type NotifyWatchOpt uint64
|
||||||
|
|
||||||
|
// NotifyWatchOpt values.
|
||||||
|
//
|
||||||
|
// These aren't declared using Go's iota because they're not purely internal to
|
||||||
|
// the process and iota should not be used for values that are serialized to
|
||||||
|
// disk or network. In this case, these values come over the network via the
|
||||||
|
// LocalAPI, a mostly stable API.
|
||||||
const (
|
const (
|
||||||
// NotifyWatchEngineUpdates, if set, causes Engine updates to be sent to the
|
// NotifyWatchEngineUpdates, if set, causes Engine updates to be sent to the
|
||||||
// client either regularly or when they change, without having to ask for
|
// client either regularly or when they change, without having to ask for
|
||||||
// each one via Engine.RequestStatus.
|
// each one via Engine.RequestStatus.
|
||||||
NotifyWatchEngineUpdates NotifyWatchOpt = 1 << iota
|
NotifyWatchEngineUpdates NotifyWatchOpt = 1 << 0
|
||||||
|
|
||||||
NotifyInitialState // if set, the first Notify message (sent immediately) will contain the current State + BrowseToURL + SessionID
|
NotifyInitialState NotifyWatchOpt = 1 << 1 // if set, the first Notify message (sent immediately) will contain the current State + BrowseToURL + SessionID
|
||||||
NotifyInitialPrefs // if set, the first Notify message (sent immediately) will contain the current Prefs
|
NotifyInitialPrefs NotifyWatchOpt = 1 << 2 // if set, the first Notify message (sent immediately) will contain the current Prefs
|
||||||
NotifyInitialNetMap // if set, the first Notify message (sent immediately) will contain the current NetMap
|
NotifyInitialNetMap NotifyWatchOpt = 1 << 3 // if set, the first Notify message (sent immediately) will contain the current NetMap
|
||||||
|
|
||||||
NotifyNoPrivateKeys // if set, private keys that would normally be sent in updates are zeroed out
|
NotifyNoPrivateKeys NotifyWatchOpt = 1 << 4 // if set, private keys that would normally be sent in updates are zeroed out
|
||||||
NotifyInitialDriveShares // if set, the first Notify message (sent immediately) will contain the current Taildrive Shares
|
NotifyInitialDriveShares NotifyWatchOpt = 1 << 5 // if set, the first Notify message (sent immediately) will contain the current Taildrive Shares
|
||||||
NotifyInitialOutgoingFiles // if set, the first Notify message (sent immediately) will contain the current Taildrop OutgoingFiles
|
NotifyInitialOutgoingFiles NotifyWatchOpt = 1 << 6 // if set, the first Notify message (sent immediately) will contain the current Taildrop OutgoingFiles
|
||||||
|
|
||||||
NotifyInitialHealthState // if set, the first Notify message (sent immediately) will contain the current health.State of the client
|
NotifyInitialHealthState NotifyWatchOpt = 1 << 7 // if set, the first Notify message (sent immediately) will contain the current health.State of the client
|
||||||
|
|
||||||
NotifyRateLimit // if set, rate limit spammy netmap updates to every few seconds
|
NotifyRateLimit NotifyWatchOpt = 1 << 8 // if set, rate limit spammy netmap updates to every few seconds
|
||||||
)
|
)
|
||||||
|
|
||||||
// Notify is a communication from a backend (e.g. tailscaled) to a frontend
|
// Notify is a communication from a backend (e.g. tailscaled) to a frontend
|
||||||
|
Loading…
x
Reference in New Issue
Block a user