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/cmd/connector-gen
Joe Tsai c299a96624 all: apply consistent imports of "json" packages
This runs:

        go run ./cmd/jsonimports -update -ignore=tempfork/

which applies the following rules:

  * Until the Go standard library formally accepts "encoding/json/v2"
    and "encoding/json/jsontext" into the standard library
    (i.e., they are no longer considered experimental),
    we forbid any code from directly importing those packages.
    Go code should instead import "github.com/go-json-experiment/json"
    and "github.com/go-json-experiment/json/jsontext".
    The latter packages contain aliases to the standard library
    if built on Go 1.25 with the goexperiment.jsonv2 tag specified.

  * Imports of "encoding/json" or "github.com/go-json-experiment/json/v1"
    must be explicitly imported under the package name "jsonv1".
    If both packages need to be imported, then
    the former should be imported under the package name "jsonv1std".

  * Imports of "github.com/go-json-experiment/json"
    must be explicitly imported under the package name "jsonv2".

The latter two rules exist to provide clarity when reading code.
Without them, it is unclear whether "json.Marshal" refers to v1 or v2.
With them, however, it is clear that "jsonv1.Marshal" is calling v1 and
that "jsonv2.Marshal" is calling v2.

Updates tailscale/corp#791

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
1 month ago
..
README.md cmd/connector-gen: add helper tool for wide app connector configurations 2 years ago
advertise-routes.go cmd/connector-gen: add helper tool for wide app connector configurations 2 years ago
aws.go all: apply consistent imports of "json" packages 1 month ago
connector-gen.go cmd/connector-gen: add helper tool for wide app connector configurations 2 years ago
github.go all: apply consistent imports of "json" packages 1 month ago

README.md

connector-gen

Generate Tailscale app connector configuration details from third party data.

Tailscale app connectors are used to dynamically route traffic for domain names via specific nodes on a tailnet. For larger upstream domains this may involve a large number of domains or routes, and fully dynamic discovery may be slower or involve more manual labor than ideal. This can be accelerated by pre-configuration of the associated routes, based on data provided by the target providers, which can be used to set precise autoApprovers routes, and also to pre-populate the subnet routes via --advertise-routes avoiding frequent routing reconfiguration that may otherwise occur while routes are first being discovered and advertised by the connectors.