tailscaleupdater

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TailscaleAdvertisementUpdater

type TailscaleAdvertisementUpdater struct {
	URL string
	// contains filtered or unexported fields
}

TailscaleAdvertisementUpdater keeps track of the routes which are advertised through the Tailscale client.

func New

func New(namespaces []string, url string) (*TailscaleAdvertisementUpdater, error)

New creates a new updater with the given URL if a GET request to the root path returns StatusOK

func NewUnchecked

func NewUnchecked(namespaces []string, url string, l logr.Logger) *TailscaleAdvertisementUpdater

NewUnchecked creates a new updater without validating the provided configuration. Primarily intended for tests

func (*TailscaleAdvertisementUpdater) AddRoute

func (t *TailscaleAdvertisementUpdater) AddRoute(route string) error

AddRoute adds the provided route to the internal state and updates the advertised routes in the Tailscale client if necesseary.

func (*TailscaleAdvertisementUpdater) GetRoutes

func (t *TailscaleAdvertisementUpdater) GetRoutes() map[string]struct{}

GetRoutes returns the currently registered routes

func (*TailscaleAdvertisementUpdater) SetupInformer

SetupInformer creates a services informer on the given informer factory, and sets up a handler which updates the Tailscale route advertisements

Jump to

Keyboard shortcuts

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