dnsfallback

package
v0.0.0-...-3caaee0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Overview

Package dnsfallback contains a DNS fallback mechanism for starting up Tailscale when the system DNS is broken or otherwise unavailable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

func Lookup(ctx context.Context, host string) ([]netip.Addr, error)

func SetCachePath

func SetCachePath(path string)

SetCachePath sets the path to the on-disk DERP map cache that we store and update. Additionally, if a file at this path exists, we load it and merge it with the DERP map baked into the binary.

This function should be called before any calls to UpdateCache, as it is not concurrency-safe.

func SetLogger

func SetLogger(log logger.Logf)

SetLogger sets the logging function that this package will use. The default logger if this function is not called is 'log.Printf'.

func UpdateCache

func UpdateCache(c *tailcfg.DERPMap)

UpdateCache stores the DERP map cache back to disk.

The caller must not mutate 'c' after calling this function.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL