Commit Graph

15 Commits (79295b11382ab269c2f64b74a0355269d6fdc4df)

Author SHA1 Message Date
Brad Fitzpatrick 2896be60db Move "logger" package to under types, now that we have it.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Anderson dec5d64593 ipn/ipnserver: remove Options.AllowQuit.
It was previously used by the MacOS client, but it now does
something different. ipnserver should never obey a client's
request to exit.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Brad Fitzpatrick 747c7d7ce2 types/empty: add Message, stop using mysterious *struct{}
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
David Anderson 5f45b7c765 ipn: make LocalBackend.loadStateWithLock easier to follow.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 96fd8b4230 ipn: adjust backend docs a bit more.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 73c0a2bee2 Improve documentation in backend.go.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson f51293a2c7 Lint fixes.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
David Anderson 5bc632271b Introduce a state store to LocalBackend.
The store is passed-in by callers of NewLocalBackend and
ipnserver.Run, but currently all callers are hardcoded to
an in-memory store. The store is unused.

Signed-Off-By: David Anderson <dave@natulte.net>
5 years ago
David Anderson 21280ca2d1 Make ipn.Options.Prefs a pointer.
This is a prelude to making it truly optional, once state
management has moved into the backend. For now though, it's
still required. This change is just isolating the bubbling-up
of the pointerification into other layers.

Signed-Off-By: David Anderson <dave@natulte.net>
5 years ago
David Anderson f6f154193f Remove LoginFlags from Backend options.
- It was only used in one currently-unused client.
- It's an imperative command, not a configuration setting.
- The LoginFlags stuff in controlclient feels like it needs
  a refactor anyway.

I'll put this logic back once ipnd owns its state and Backend
commands reflect that.

Signed-Off-By: David Anderson <dave@natulte.net>
5 years ago
David Anderson 81eedcd5be ipnserver: ignore lint error for unused context.
The linter is strictly correct, but the code is structured
this way to avoid variable shadowing problems in the following
for loop. The context doesn't leak.

Staticcheck is correctly pointing out that this code is hard to
follow. However, this chunk of code is in service of enforcing
one frontend <> one backend, and we want to remove that limitation.
So, we'll just ignore the lint warning until this entire piece of
code goes away.

Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Shawn Smith 1ca83fd205 fix typos
Signed-off-by: Shawn Smith <shawnpsmith@gmail.com>
5 years ago
David Crawshaw 33dfb8999e controlclient, ipn: update tests for key pointer change
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
5 years ago
David Anderson c3f9f74247 ipn: fix lint complaints in tests.
Signed-off-by: David Anderson <dave@natulte.net>
5 years ago
Earl Lee a8d8b8719a Move Linux client & common packages into a public repo. 5 years ago