headscale/hscontrol
Kristoffer Dalby 387aa03adb Remove database from Mapper
This commit changes the internals of the mapper to
track all the changes to peers over its lifetime.

This means that it no longer depends on the database
and this should hopefully help with locks and timing issues.
When the mapper is created, it needs the current list of peers,
the world view, when the polling session was started. Then as
update changes are called, it tracks the changes and generates
responses based on its internal list.

As a side, the types.Machines and types.MachinesP, as well as
types.Machine being passed as a full struct and pointer has been
changed to always be pointers, everywhere.

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-09-19 10:20:21 -05:00
..
assets update flake, fix prettier lint 2023-09-05 08:47:43 +02:00
db Remove database from Mapper 2023-09-19 10:20:21 -05:00
derp fix lint 2023-09-19 10:20:21 -05:00
mapper Remove database from Mapper 2023-09-19 10:20:21 -05:00
notifier rearrange poll, lock, notify 2023-09-19 10:20:21 -05:00
policy Remove database from Mapper 2023-09-19 10:20:21 -05:00
templates update flake, fix prettier lint 2023-09-05 08:47:43 +02:00
types Remove database from Mapper 2023-09-19 10:20:21 -05:00
util use cmp.Diff instead of reflect.DeepEqual 2023-07-01 21:55:47 +02:00
app.go Add missing return in shutdown 2023-09-19 10:20:21 -05:00
auth_legacy.go rename handler files 2023-06-08 16:34:15 +02:00
auth_noise.go rename handler files 2023-06-08 16:34:15 +02:00
auth.go fix lint 2023-09-19 10:20:21 -05:00
grpcv1_test.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
grpcv1.go Remove database from Mapper 2023-09-19 10:20:21 -05:00
handler_legacy.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
handler_placeholder.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
handlers.go rename handler files 2023-06-08 16:34:15 +02:00
metrics.go Replace the timestamp based state system 2023-09-19 10:20:21 -05:00
noise.go move derp.go to derp module 2023-06-08 16:34:15 +02:00
oidc.go introduce rw lock for db, ish... 2023-09-19 10:20:21 -05:00
platform_config.go rename package name to hscontrol 2023-05-10 20:47:51 +02:00
poll_legacy.go additional debug logging, use mapper pointer 2023-09-19 10:20:21 -05:00
poll_noise.go additional debug logging, use mapper pointer 2023-09-19 10:20:21 -05:00
poll.go Remove database from Mapper 2023-09-19 10:20:21 -05:00
suite_test.go move Config definitions into types 2023-06-08 16:34:15 +02:00