Documentation
¶
Index ¶
- func Apply(ctx context.Context, want *catalog.File, api API, host Host, pol PolicyAPI, ...) error
- func ApplyConfigured(ctx context.Context, cat *catalog.File, opts Options, w io.Writer) error
- func FprintPlan(w io.Writer, p Plan)
- func PublishedNames(cat *catalog.File, names []string) []string
- func RepublishNames(ctx context.Context, cat *catalog.File, names []string, w io.Writer) error
- type API
- type Change
- type ClientAPI
- type ClientPolicy
- type Host
- type Options
- type Plan
- type PolicyAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyConfigured ¶
ApplyConfigured wires API and host clients, then reconciles the catalog.
func FprintPlan ¶
func PublishedNames ¶
PublishedNames returns catalog names that are published among the given ids.
Types ¶
type ClientAPI ¶
type ClientAPI struct {
Services *tailscale.ServicesResource
}
func (ClientAPI) CreateOrUpdate ¶
type ClientPolicy ¶
type ClientPolicy struct {
Policy *tailscale.PolicyFileResource
}
func (ClientPolicy) SetRaw ¶
func (c ClientPolicy) SetRaw(ctx context.Context, body, etag string) error
func (ClientPolicy) ValidateRaw ¶
func (c ClientPolicy) ValidateRaw(ctx context.Context, body string) error
type Host ¶
type Host interface {
GetConfig(ctx context.Context) (*catalog.ServeFile, error)
EnsureHostTags(ctx context.Context, tags []string, resetNode bool) error
Serve(ctx context.Context, name, endpoint, local string) error
Advertise(ctx context.Context, svc string) error
Drain(ctx context.Context, svc string) error
Clear(ctx context.Context, name, endpoint string) error
}
type Options ¶
type Options struct {
DryRun bool
Tailnet bool
Host bool
Advertise bool
Policy bool
// Names limits VIP puts, Serve, and steady-state advertise to these
// catalog names (or vip / svc: aliases). Empty means every service.
// ACL merge stays catalog-wide. After a policy write, every service
// is drained, re-served, and advertised.
Names []string
// Prune deletes VIP Services and Serve mappings whose svc: name is
// not in this catalog, and rewrites the catalog-owned 443 grant.
Prune bool
// ResetNode allows tailscale up --reset when tagging the node.
ResetNode bool
}
Click to show internal directories.
Click to hide internal directories.