Movatterモバイル変換


[0]ホーム

URL:


appc

package
v1.92.3Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:20Imported by:1

Details

Repository

github.com/tailscale/tailscale

Links

Documentation

Overview

Package appc implements App Connectors.An AppConnector provides DNS domain oriented routing of traffic. An AppConnector becomes a DNS server for a peer, authoritative for the set ofconfigured domains. DNS resolution of the target domain triggers dynamicpublication of routes to ensure that traffic to the domain is routed throughthe App Connector.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAppConnectoradded inv1.54.0

type AppConnector struct {// contains filtered or unexported fields}

AppConnector is an implementation of an AppConnector that performsits function as a subsystem inside of a tailscale node. At the control planeside App Connector routing is configured in terms of domains rather than IPaddresses.The AppConnectors responsibility inside tailscaled is to apply the routingand domain configuration as supplied in the map response.DNS requests for configured domains are observed. If the domains resolve toroutes not yet served by the AppConnector the local node configuration isupdated to advertise the new route.

funcNewAppConnectoradded inv1.54.0

func NewAppConnector(cConfig) *AppConnector

NewAppConnector creates a new AppConnector.

func (*AppConnector)ClearRoutesadded inv1.66.0

func (e *AppConnector) ClearRoutes()error

ClearRoutes removes all route state from the AppConnector.

func (*AppConnector)Closeadded inv1.90.0

func (e *AppConnector) Close()

Close closes the connector and cleans up resources associated with it.It is safe (and a noop) to call Close on nil.

func (*AppConnector)DomainRoutesadded inv1.54.0

func (e *AppConnector) DomainRoutes() map[string][]netip.Addr

DomainRoutes returns a map of domains to resolved IPaddresses.

func (*AppConnector)Domainsadded inv1.54.0

func (e *AppConnector) Domains()views.Slice[string]

Domains returns the currently configured domain list.

func (*AppConnector)ObserveDNSResponseadded inv1.54.0

func (e *AppConnector) ObserveDNSResponse(res []byte)error

ObserveDNSResponse is a callback invoked by the DNS resolver when a DNSresponse is being returned over the PeerAPI. The response is parsed andmatched against the configured domains, if matched the routeAdvertiser isadvised to advertise the discovered route.

func (*AppConnector)ShouldStoreRoutesadded inv1.66.0

func (e *AppConnector) ShouldStoreRoutes()bool

ShouldStoreRoutes returns true if the appconnector was created with the controlknob onand is storing its discovered routes persistently.

func (*AppConnector)UpdateDomainsadded inv1.54.0

func (e *AppConnector) UpdateDomains(domains []string)

UpdateDomains asynchronously replaces the current set of configured domainswith the supplied set of domains. Domains must not contain a trailing dot,and should be lower case. If the domain contains a leading '*' label itmatches all subdomains of a domain.

func (*AppConnector)UpdateDomainsAndRoutesadded inv1.58.1

func (e *AppConnector) UpdateDomainsAndRoutes(domains []string, routes []netip.Prefix)

UpdateDomainsAndRoutes starts an asynchronous update of the configurationgiven the new domains and routes.

func (*AppConnector)Waitadded inv1.58.1

func (e *AppConnector) Wait(ctxcontext.Context)

Wait waits for the currently scheduled asynchronous configuration changes tocomplete.

typeConfigadded inv1.90.0

type Config struct {// Logf is the logger to which debug logs from the connector will be sent.// It must be non-nil.Logflogger.Logf// EventBus receives events when the collection of routes maintained by the// connector is updated. It must be non-nil.EventBus *eventbus.Bus// RouteAdvertiser allows the connector to update the set of advertised routes.RouteAdvertiserRouteAdvertiser// RouteInfo, if non-nil, use used as the initial set of routes for the// connector.  If nil, the connector starts empty.RouteInfo *appctype.RouteInfo// HasStoredRoutes indicates that the connector should assume stored routes.HasStoredRoutesbool}

Config carries the settings for anAppConnector.

typeRouteAdvertiseradded inv1.54.0

type RouteAdvertiser interface {// AdvertiseRoute adds one or more route advertisements skipping any that// are already advertised.AdvertiseRoute(...netip.Prefix)error// UnadvertiseRoute removes any matching route advertisements.UnadvertiseRoute(...netip.Prefix)error}

RouteAdvertiser is an interface that allows the AppConnector to advertisenewly discovered routes that need to be served through the AppConnector.

Source Files

View all Source files

Directories

PathSynopsis
Package appctest contains code to help test App Connectors.
Package appctest contains code to help test App Connectors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp