gatewaysync

package
v0.35.0-rc.9 Latest Latest
Warning

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

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

Documentation

Overview

Package gatewaysync provides shared to-host sync orchestration for Gateway API resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToHost

func CreateToHost[O any, T interface {
	*O
	client.Object
}](
	ctx *synccontext.SyncContext,
	event *synccontext.SyncToHostEvent[T],
	rec events.EventRecorder,
	patches []config.TranslatePatch,
	toHost func() (T, error),
) (ctrl.Result, error)

CreateToHost runs the standard to-host create flow.

func CreateToVirtual

func CreateToVirtual[O any, T interface {
	*O
	client.Object
}](
	ctx *synccontext.SyncContext,
	event *synccontext.SyncToVirtualEvent[T],
	rec events.EventRecorder,
	patches []config.TranslatePatch,
	buildVirtual func() T,
) (ctrl.Result, error)

CreateToVirtual runs the standard from-host import create flow.

func DeleteReason

func DeleteReason(virtual client.Object) string

DeleteReason explains why a host object is being removed, distinguishing a user-initiated virtual deletion from the host object disappearing.

func RecordRefNotPermitted

func RecordRefNotPermitted(rec events.EventRecorder, obj client.Object, err error)

RecordRefNotPermitted records a Warning event for a denied virtual reference.

func RecordSyncError

func RecordSyncError(rec events.EventRecorder, obj client.Object, err error)

RecordSyncError records a Warning event for a failed sync.

func RecordUnsupportedReference

func RecordUnsupportedReference(rec events.EventRecorder, obj client.Object, err error)

RecordUnsupportedReference records a Warning event for a reference kind vCluster cannot translate; the object is not synced to the host.

func Sync

func Sync[T client.Object](
	ctx *synccontext.SyncContext,
	event *synccontext.SyncEvent[T],
	rec events.EventRecorder,
	patches []config.TranslatePatch,
	translateSpec func() error,
	applyToHost func() error,
) (_ ctrl.Result, retErr error)

Sync runs the standard to-host update flow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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