From 1f4669a380cb4dec118a87c54fcc4beb8b2c20a2 Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Wed, 16 Nov 2022 23:04:07 +0500 Subject: [PATCH] all: standardize on LocalAPI Signed-off-by: Maisem Ali --- client/tailscale/apitype/apitype.go | 2 +- client/tailscale/localclient.go | 2 +- client/tailscale/tailscale.go | 2 +- cmd/containerboot/main.go | 48 ++++++++++++++--------------- cmd/tailscale/cli/debug.go | 2 +- cmd/tailscale/cli/up.go | 2 +- derp/derp_server.go | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/client/tailscale/apitype/apitype.go b/client/tailscale/apitype/apitype.go index 13421d5b5..b522734f1 100644 --- a/client/tailscale/apitype/apitype.go +++ b/client/tailscale/apitype/apitype.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package apitype contains types for the Tailscale local API and control plane API. +// Package apitype contains types for the Tailscale LocalAPI and control plane API. package apitype import "tailscale.com/tailcfg" diff --git a/client/tailscale/localclient.go b/client/tailscale/localclient.go index 30772db24..2e09750a8 100644 --- a/client/tailscale/localclient.go +++ b/client/tailscale/localclient.go @@ -42,7 +42,7 @@ import ( // package-level functions. var defaultLocalClient LocalClient -// LocalClient is a client to Tailscale's "local API", communicating with the +// LocalClient is a client to Tailscale's "LocalAPI", communicating with the // Tailscale daemon on the local machine. Its API is not necessarily stable and // subject to changes between releases. Some API calls have stricter // compatibility guarantees, once they've been widely adopted. See method docs diff --git a/client/tailscale/tailscale.go b/client/tailscale/tailscale.go index 60e1a0fb9..275aeafb8 100644 --- a/client/tailscale/tailscale.go +++ b/client/tailscale/tailscale.go @@ -4,7 +4,7 @@ //go:build go1.19 -// Package tailscale contains Go clients for the Tailscale Local API and +// Package tailscale contains Go clients for the Tailscale LocalAPI and // Tailscale control plane API. // // Warning: this package is in development and makes no API compatibility diff --git a/cmd/containerboot/main.go b/cmd/containerboot/main.go index 084b582a9..a3962d669 100644 --- a/cmd/containerboot/main.go +++ b/cmd/containerboot/main.go @@ -12,30 +12,30 @@ // As with most container things, configuration is passed through // environment variables. All configuration is optional. // -// - TS_AUTH_KEY: the authkey to use for login. -// - TS_ROUTES: subnet routes to advertise. -// - TS_DEST_IP: proxy all incoming Tailscale traffic to the given -// destination. -// - TS_TAILSCALED_EXTRA_ARGS: extra arguments to 'tailscaled'. -// - TS_EXTRA_ARGS: extra arguments to 'tailscale up'. -// - TS_USERSPACE: run with userspace networking (the default) -// instead of kernel networking. -// - TS_STATE_DIR: the directory in which to store tailscaled -// state. The data should persist across container -// restarts. -// - TS_ACCEPT_DNS: whether to use the tailnet's DNS configuration. -// - TS_KUBE_SECRET: the name of the Kubernetes secret in which to -// store tailscaled state. -// - TS_SOCKS5_SERVER: the address on which to listen for SOCKS5 -// proxying into the tailnet. -// - TS_OUTBOUND_HTTP_PROXY_LISTEN: the address on which to listen -// for HTTP proxying into the tailnet. -// - TS_SOCKET: the path where the tailscaled local API socket should -// be created. -// - TS_AUTH_ONCE: if true, only attempt to log in if not already -// logged in. If false (the default, for backwards -// compatibility), forcibly log in every time the -// container starts. +// - TS_AUTH_KEY: the authkey to use for login. +// - TS_ROUTES: subnet routes to advertise. +// - TS_DEST_IP: proxy all incoming Tailscale traffic to the given +// destination. +// - TS_TAILSCALED_EXTRA_ARGS: extra arguments to 'tailscaled'. +// - TS_EXTRA_ARGS: extra arguments to 'tailscale up'. +// - TS_USERSPACE: run with userspace networking (the default) +// instead of kernel networking. +// - TS_STATE_DIR: the directory in which to store tailscaled +// state. The data should persist across container +// restarts. +// - TS_ACCEPT_DNS: whether to use the tailnet's DNS configuration. +// - TS_KUBE_SECRET: the name of the Kubernetes secret in which to +// store tailscaled state. +// - TS_SOCKS5_SERVER: the address on which to listen for SOCKS5 +// proxying into the tailnet. +// - TS_OUTBOUND_HTTP_PROXY_LISTEN: the address on which to listen +// for HTTP proxying into the tailnet. +// - TS_SOCKET: the path where the tailscaled LocalAPI socket should +// be created. +// - TS_AUTH_ONCE: if true, only attempt to log in if not already +// logged in. If false (the default, for backwards +// compatibility), forcibly log in every time the +// container starts. // // When running on Kubernetes, TS_KUBE_SECRET takes precedence over // TS_STATE_DIR. Additionally, if TS_AUTH_KEY is not provided and the diff --git a/cmd/tailscale/cli/debug.go b/cmd/tailscale/cli/debug.go index a10d8811c..3952b8ccb 100644 --- a/cmd/tailscale/cli/debug.go +++ b/cmd/tailscale/cli/debug.go @@ -100,7 +100,7 @@ var debugCmd = &ffcli.Command{ { Name: "local-creds", Exec: runLocalCreds, - ShortHelp: "print how to access Tailscale local API", + ShortHelp: "print how to access Tailscale LocalAPI", }, { Name: "restun", diff --git a/cmd/tailscale/cli/up.go b/cmd/tailscale/cli/up.go index 5cac8bfe5..1b2076a2c 100644 --- a/cmd/tailscale/cli/up.go +++ b/cmd/tailscale/cli/up.go @@ -282,7 +282,7 @@ func calcAdvertiseRoutes(advertiseRoutes string, advertiseDefaultRoute bool) ([] // Note that the parameters upArgs and warnf are named intentionally // to shadow the globals to prevent accidental misuse of them. This // function exists for testing and should have no side effects or -// outside interactions (e.g. no making Tailscale local API calls). +// outside interactions (e.g. no making Tailscale LocalAPI calls). func prefsFromUpArgs(upArgs upArgsT, warnf logger.Logf, st *ipnstate.Status, goos string) (*ipn.Prefs, error) { routes, err := calcAdvertiseRoutes(upArgs.advertiseRoutes, upArgs.advertiseDefaultRoute) if err != nil { diff --git a/derp/derp_server.go b/derp/derp_server.go index 32cba4d4b..cf7f6fe7e 100644 --- a/derp/derp_server.go +++ b/derp/derp_server.go @@ -141,7 +141,7 @@ type Server struct { tcpRtt metrics.LabelMap // histogram // verifyClients only accepts client connections to the DERP server if the clientKey is a - // known peer in the network, as specified by a running tailscaled's client's local api. + // known peer in the network, as specified by a running tailscaled's client's LocalAPI. verifyClients bool mu sync.Mutex