Documentation
¶
Overview ¶
Package gatewaysync provides shared to-host sync orchestration for Gateway API resources.
Index ¶
- func CreateToHost[O any, T interface{ ... }](ctx *synccontext.SyncContext, event *synccontext.SyncToHostEvent[T], ...) (ctrl.Result, error)
- func CreateToVirtual[O any, T interface{ ... }](ctx *synccontext.SyncContext, event *synccontext.SyncToVirtualEvent[T], ...) (ctrl.Result, error)
- func DeleteReason(virtual client.Object) string
- func RecordRefNotPermitted(rec events.EventRecorder, obj client.Object, err error)
- func RecordSyncError(rec events.EventRecorder, obj client.Object, err error)
- func RecordUnsupportedReference(rec events.EventRecorder, obj client.Object, err error)
- func Sync[T client.Object](ctx *synccontext.SyncContext, event *synccontext.SyncEvent[T], ...) (_ ctrl.Result, retErr error)
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 ¶
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.