runner

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: AGPL-3.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 Config

type Config struct {
	Logger            *slog.Logger
	XdsIR             *message.XdsIR
	Xds               *message.Xds
	ProviderResources *message.ProviderResources
	// ExtensionServer is an optional extension server to send hooks
	// to during translation.
	ExtensionServer *translator.ExtensionServer
	// XdsPatch, when set, runs on every translation result before it is
	// published.
	XdsPatch PatchFunc
	// Retranslate runs translation again for every known IR key when
	// signaled. This also runs the extension hooks and XdsPatch again. No
	// Gateway-API resource has to change. Embedders use it when data those
	// hooks read, such as endpoint sets or latency ranks, changes out of
	// band. The message bus and the snapshot cache both discard unchanged
	// output. A spurious signal thus causes no Envoy churn.
	Retranslate <-chan struct{}
}

type PatchFunc added in v0.23.0

type PatchFunc func(key string, res *xdstypes.ResourceVersionTable)

PatchFunc changes the translated xDS resource table for one IR key. It runs before the table goes to the snapshot cache. Unlike the gRPC extension hooks, it runs in-process. It sees every resource type: clusters, endpoints, and listeners. An embedding process can thus rewrite clusters and add the matching EDS resources in one place. It runs on the translation path and must not block.

type Runner

type Runner struct {
	Config
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) *Runner

func (*Runner) Name

func (r *Runner) Name() string

func (*Runner) Start

func (r *Runner) Start(ctx context.Context) (err error)

Start starts the xds-translator runner

Jump to

Keyboard shortcuts

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