You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/control/controlclient
James Tucker a96ef432cf control/controlclient,ipn/ipnlocal: replace State enum with boolean flags
Remove the State enum (StateNew, StateNotAuthenticated, etc.) from
controlclient and replace it with two explicit boolean fields:
- LoginFinished: indicates successful authentication
- Synced: indicates we've received at least one netmap

This makes the state more composable and easier to reason about, as
multiple conditions can be true independently rather than being
encoded in a single enum value.

The State enum was originally intended as the state machine for the
whole client, but that abstraction moved to ipn.Backend long ago.
This change continues moving away from the legacy state machine by
representing state as a combination of independent facts.

Also adds test helpers in ipnlocal that check independent, observable
facts (hasValidNetMap, needsLogin, etc.) rather than relying on
derived state enums, making tests more robust.

Updates #12639

Signed-off-by: James Tucker <james@tailscale.com>
3 weeks ago
..
auto.go control/controlclient,ipn/ipnlocal: replace State enum with boolean flags 3 weeks ago
client.go control/controlclient: introduce eventbus messages instead of callbacks (#16956) 3 months ago
controlclient_test.go control/controlclient,ipn/ipnlocal: replace State enum with boolean flags 3 weeks ago
direct.go control/controlclient: make Observer optional 3 weeks ago
direct_test.go net/netmon: remove usage of direct callbacks from netmon (#17292) 2 months ago
errors.go control/controlclient, ipn: add client audit logging (#14950) 9 months ago
map.go control/controlclient: optimize zstd decode of KeepAlive messages 2 months ago
map_test.go control/controlclient: optimize zstd decode of KeepAlive messages 2 months ago
sign.go all: update copyright and license headers 3 years ago
sign_supported.go util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
sign_supported_test.go all: update copyright and license headers 3 years ago
sign_unsupported.go util/syspolicy/policyclient: add policyclient.Client interface, start plumbing 3 months ago
status.go control/controlclient,ipn/ipnlocal: replace State enum with boolean flags 3 weeks ago