registry

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInMemoryCompositeManager added in v1.8.0

func NewInMemoryCompositeManager(
	exts []*egv1a1.ExtensionManager,
	server extension.EnvoyGatewayExtensionServer,
) (extTypes.Manager, error)

NewInMemoryCompositeManager builds a CompositeManager with one namedManager per supplied ExtensionManager config. All entries share a single in-process gRPC server (bufconn) so tests exercise the composite code path without needing distinct servers. Callers tear down the bufconn/server by calling CleanupHookConns() on the returned Manager (idempotent — safe to call multiple times).

func NewInMemoryManager added in v1.1.0

func NewInMemoryManager(cfg *egv1a1.ExtensionManager, server extension.EnvoyGatewayExtensionServer) (extTypes.Manager, func(), error)

func NewManager

func NewManager(cfg *config.Server, inK8s bool) (extTypes.Manager, error)

NewManager creates a Manager (or CompositeManager) from the server configuration. It uses GetExtensionManagers() to normalize the singular/plural extension manager fields.

  • 0 extensions → returns a Manager with empty config (no-op)
  • 1 extension → returns a plain Manager
  • 2+ extensions → creates individual Managers per extension, wraps in CompositeManager

Types

type CompositeManager added in v1.8.0

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

CompositeManager wraps multiple Manager instances and implements the Manager interface. It chains extension calls sequentially: each extension's output becomes the next extension's input.

func NewCompositeManager added in v1.8.0

func NewCompositeManager(managers []namedManager) *CompositeManager

NewCompositeManager creates a CompositeManager from a list of named managers.

func (*CompositeManager) CleanupHookConns added in v1.8.0

func (c *CompositeManager) CleanupHookConns()

CleanupHookConns closes all gRPC connections for all child managers.

func (*CompositeManager) FailOpen added in v1.8.0

func (c *CompositeManager) FailOpen() bool

FailOpen returns true only if all children are fail-open (conservative default).

func (*CompositeManager) GetPostXDSHookClient added in v1.8.0

func (c *CompositeManager) GetPostXDSHookClient(xdsHookType egv1a1.XDSTranslatorHook) (extTypes.XDSHookClient, error)

GetPostXDSHookClient returns a compositeXDSHookClient that chains all child clients for the given hook type.

func (*CompositeManager) GetPreXDSHookClient added in v1.8.0

func (c *CompositeManager) GetPreXDSHookClient(xdsHookType egv1a1.XDSTranslatorHook) (extTypes.XDSHookClient, error)

GetPreXDSHookClient returns a compositeXDSHookClient that chains all child clients for the given hook type.

func (*CompositeManager) GetTranslationHookConfig added in v1.8.0

func (c *CompositeManager) GetTranslationHookConfig() *egv1a1.TranslationConfig

GetTranslationHookConfig merges configs using OR semantics: a resource type is included if any manager enables it. The ShouldInclude* helpers handle nil/default values correctly (clusters/secrets default to true; listeners/routes default to false).

func (*CompositeManager) HasExtension added in v1.8.0

func (c *CompositeManager) HasExtension(g gwapiv1.Group, k gwapiv1.Kind) bool

HasExtension returns true if any child manager has the extension (union semantics).

type Manager

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

func (*Manager) CleanupHookConns

func (m *Manager) CleanupHookConns()

func (*Manager) FailOpen added in v1.3.0

func (m *Manager) FailOpen() bool

FailOpen returns true if the extension manager is configured to fail open, and false otherwise.

func (*Manager) GetPostXDSHookClient

func (m *Manager) GetPostXDSHookClient(xdsHookType egv1a1.XDSTranslatorHook) (extTypes.XDSHookClient, error)

GetPostXDSHookClient checks if the registered extension makes use of a particular hook type that modifies xDS resources after they are generated by Envoy Gateway. If the extension makes use of the hook then the XDS Hook Client is returned. If it does not support the hook type then nil is returned

func (*Manager) GetPreXDSHookClient

func (m *Manager) GetPreXDSHookClient(xdsHookType egv1a1.XDSTranslatorHook) (extTypes.XDSHookClient, error)

GetPreXDSHookClient checks if the registered extension makes use of a particular hook type that modifies inputs that are used to generate an xDS resource. If the extension makes use of the hook then the XDS Hook Client is returned. If it does not support the hook type then nil is returned

func (*Manager) GetTranslationHookConfig added in v1.5.0

func (m *Manager) GetTranslationHookConfig() *egv1a1.TranslationConfig

GetTranslationHookConfig returns the translation hook configuration.

func (*Manager) HasExtension

func (m *Manager) HasExtension(g gwapiv1.Group, k gwapiv1.Kind) bool

HasExtension checks to see whether a given Group and Kind has an associated extension registered for it.

type XDSHook

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

func (*XDSHook) PostClusterModifyHook added in v1.5.0

func (h *XDSHook) PostClusterModifyHook(cluster *cluster.Cluster, extensionResources []*unstructured.Unstructured) (*cluster.Cluster, error)

func (*XDSHook) PostEndpointsModifyHook added in v1.8.0

func (h *XDSHook) PostEndpointsModifyHook(loadAssignment *endpoint.ClusterLoadAssignment) (*endpoint.ClusterLoadAssignment, error)

func (*XDSHook) PostHTTPListenerModifyHook

func (h *XDSHook) PostHTTPListenerModifyHook(l *listener.Listener, extensionResources []*unstructured.Unstructured) (*listener.Listener, error)

func (*XDSHook) PostRouteModifyHook

func (h *XDSHook) PostRouteModifyHook(route *route.Route, routeHostnames []string, extensionResources []*unstructured.Unstructured) (*route.Route, error)

func (*XDSHook) PostTranslateModifyHook

func (h *XDSHook) PostTranslateModifyHook(clusters []*cluster.Cluster, secrets []*tls.Secret, listeners []*listener.Listener, routes []*route.RouteConfiguration, extensionPolicies []*ir.UnstructuredRef) ([]*cluster.Cluster, []*tls.Secret, []*listener.Listener, []*route.RouteConfiguration, error)

func (*XDSHook) PostVirtualHostModifyHook

func (h *XDSHook) PostVirtualHostModifyHook(vh *route.VirtualHost) (*route.VirtualHost, error)

Jump to

Keyboard shortcuts

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