services

package
v0.0.0-...-ac943e3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package services contains the registrar's mesh-Service generator: it projects the mesh service catalog into selectorless k8s Services on the mesh port — transparent- capture VIP/name handles (proposal 018, Phase 3a). Endpoints stay in the registry (the Services carry no selector, so no EndpointSlices); each Service is annotated with the mesh service + app port so the agent can map a captured ClusterIP (original-dst) back to the registry-backed EDS cluster.

Index

Constants

View Source
const (
	AppProtocolHTTP = "http"
	AppProtocolTCP  = "tcp"
)

AppProtocolHTTP / AppProtocolTCP are the AnnotationMeshAppProtocol values the generator writes (and the agent reads to decide TCP-floor chain emission).

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	client.Client
	Snapshot *server.Snapshot
	MeshPort int32
	Interval time.Duration
	Log      *slog.Logger
}

Generator reconciles the registrar snapshot's mesh services into selectorless k8s Services (one per service, in the service's namespace, on MeshPort). It is a leader-elected manager Runnable: only the leader writes Services.

func (*Generator) NeedLeaderElection

func (g *Generator) NeedLeaderElection() bool

NeedLeaderElection makes the generator run only on the elected leader (single writer).

func (*Generator) Start

func (g *Generator) Start(ctx context.Context) error

Start runs the reconcile loop until the context is cancelled.

Jump to

Keyboard shortcuts

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