summaryrefslogtreecommitdiffhomepage
path: root/ipn/ipn_view.go
diff options
context:
space:
mode:
authorMarwan Sulaiman <marwan@tailscale.com>2023-08-24 00:00:56 +0100
committerMarwan Sulaiman <marwan@tailscale.com>2023-08-24 15:38:54 +0100
commitdf49cb24d549393e75e95065c0fc865e2108eb7f (patch)
treed4ab6b4c2fe9dd07d47fbbac9be3fb8a51bdcae6 /ipn/ipn_view.go
parent9c07f4f512f71799a796cb3cdb5532657df8444f (diff)
downloadtailscale-marwan/scmem.tar.xz
tailscale-marwan/scmem.zip
ipn, ipn/ipnlocal: add an in memory serve configmarwan/scmem
This PR adds a parallel in-memory ServeConfig so that foreground funnels are guaranteed to go away in case of unexpected shutdown Updates #8489 Signed-off-by: Marwan Sulaiman <marwan@tailscale.com>
Diffstat (limited to 'ipn/ipn_view.go')
-rw-r--r--ipn/ipn_view.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipn/ipn_view.go b/ipn/ipn_view.go
index 8a04c2c32..9cb66edcf 100644
--- a/ipn/ipn_view.go
+++ b/ipn/ipn_view.go
@@ -159,6 +159,8 @@ func (v *ServeConfigView) UnmarshalJSON(b []byte) error {
return nil
}
+func (v ServeConfigView) InMemory() bool { return v.ж.InMemory }
+
func (v ServeConfigView) TCP() views.MapFn[uint16, *TCPPortHandler, TCPPortHandlerView] {
return views.MapFnOf(v.ж.TCP, func(t *TCPPortHandler) TCPPortHandlerView {
return t.View()
@@ -177,6 +179,7 @@ func (v ServeConfigView) AllowFunnel() views.Map[HostPort, bool] {
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
var _ServeConfigViewNeedsRegeneration = ServeConfig(struct {
+ InMemory bool
TCP map[uint16]*TCPPortHandler
Web map[HostPort]*WebServerConfig
AllowFunnel map[HostPort]bool