host

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Bin string
}

CLI talks to the local tailscaled via the tailscale CLI. Serve mappings are host-local; they are not in the control-plane API.

func (CLI) Advertise

func (c CLI) Advertise(ctx context.Context, svc string) error

func (CLI) Clear

func (c CLI) Clear(ctx context.Context, name, endpoint string) error

Clear removes one Serve mapping. port is the public tcp port, without the tcp: prefix.

func (CLI) Drain

func (c CLI) Drain(ctx context.Context, svc string) error

func (CLI) EnsureHostTags

func (c CLI) EnsureHostTags(ctx context.Context, want []string, resetNode bool) error

EnsureHostTags makes this machine a tagged node so it can host VIP Services. It requests access.autoApproveHost via tailscale up when tags are missing.

func (CLI) GetConfig

func (c CLI) GetConfig(ctx context.Context) (*catalog.ServeFile, error)

func (CLI) MagicDNS

func (c CLI) MagicDNS(ctx context.Context) (MagicDNS, error)

func (CLI) SelfTags

func (c CLI) SelfTags(ctx context.Context) ([]string, error)

SelfTags returns ACL tags currently applied to this node (not merely requested).

func (CLI) Serve

func (c CLI) Serve(ctx context.Context, name, endpoint, local string) error

Serve publishes one VIP Service over HTTPS, proxying to a local HTTP target.

`tailscale serve set-config` treats the target scheme as the *public* protocol. get-config dumps the backend as http://, so --all would try to replace an existing HTTPS:443 mapping with HTTP:443 and fail. The CLI form (--https=443 http://127.0.0.1:port) keeps public HTTPS.

type MagicDNS

type MagicDNS struct {
	Suffix string
}

Jump to

Keyboard shortcuts

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