Documentation ¶
Index ¶
- func HostToVirtualFromStore(ctx *synccontext.SyncContext, req types.NamespacedName, ...) (types.NamespacedName, bool)
- func NewMapper(ctx *synccontext.RegisterContext, obj client.Object, ...) (synccontext.Mapper, error)
- func NewMapperWithObject(ctx *synccontext.RegisterContext, obj client.Object, ...) (synccontext.Mapper, error)
- func NewMapperWithoutRecorder(ctx *synccontext.RegisterContext, obj client.Object, ...) (synccontext.Mapper, error)
- func NewMirrorMapper(obj client.Object) (synccontext.Mapper, error)
- func RecordMapping(ctx *synccontext.SyncContext, pName, vName types.NamespacedName, ...) error
- func TryToTranslateBackByAnnotations(ctx *synccontext.SyncContext, req types.NamespacedName, pObj client.Object, ...) types.NamespacedName
- func TryToTranslateBackByName(ctx *synccontext.SyncContext, req types.NamespacedName, ...) types.NamespacedName
- func VirtualToHostFromStore(ctx *synccontext.SyncContext, req types.NamespacedName, ...) (types.NamespacedName, bool)
- func WithRecorder(mapper synccontext.Mapper) synccontext.Mapper
- type PhysicalNameFunc
- type PhysicalNameWithObjectFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HostToVirtualFromStore ¶
func HostToVirtualFromStore(ctx *synccontext.SyncContext, req types.NamespacedName, gvk schema.GroupVersionKind) (types.NamespacedName, bool)
func NewMapper ¶
func NewMapper(ctx *synccontext.RegisterContext, obj client.Object, translateName PhysicalNameFunc) (synccontext.Mapper, error)
NewMapper creates a new mapper with a custom physical name func
func NewMapperWithObject ¶
func NewMapperWithObject(ctx *synccontext.RegisterContext, obj client.Object, translateName PhysicalNameWithObjectFunc) (synccontext.Mapper, error)
NewMapperWithObject creates a new mapper with a custom physical name func
func NewMapperWithoutRecorder ¶
func NewMapperWithoutRecorder(ctx *synccontext.RegisterContext, obj client.Object, translateName PhysicalNameWithObjectFunc) (synccontext.Mapper, error)
NewMapperWithoutRecorder creates a new mapper with a recorder to store mappings in the mappings store
func NewMirrorMapper ¶
func NewMirrorMapper(obj client.Object) (synccontext.Mapper, error)
func RecordMapping ¶
func RecordMapping(ctx *synccontext.SyncContext, pName, vName types.NamespacedName, gvk schema.GroupVersionKind) error
func TryToTranslateBackByAnnotations ¶
func TryToTranslateBackByAnnotations(ctx *synccontext.SyncContext, req types.NamespacedName, pObj client.Object, objectGvk schema.GroupVersionKind) types.NamespacedName
func TryToTranslateBackByName ¶
func TryToTranslateBackByName(ctx *synccontext.SyncContext, req types.NamespacedName, gvk schema.GroupVersionKind) types.NamespacedName
TryToTranslateBackByName is used to find out the name mapping automatically in certain scenarios, this doesn't always work, but for some cases this is pretty useful.
func VirtualToHostFromStore ¶
func VirtualToHostFromStore(ctx *synccontext.SyncContext, req types.NamespacedName, gvk schema.GroupVersionKind) (types.NamespacedName, bool)
func WithRecorder ¶
func WithRecorder(mapper synccontext.Mapper) synccontext.Mapper
Types ¶
type PhysicalNameFunc ¶
type PhysicalNameFunc func(ctx *synccontext.SyncContext, vName, vNamespace string) types.NamespacedName
PhysicalNameFunc is a definition to translate a name
type PhysicalNameWithObjectFunc ¶
type PhysicalNameWithObjectFunc func(ctx *synccontext.SyncContext, vName, vNamespace string, vObj client.Object) types.NamespacedName
PhysicalNameWithObjectFunc is a definition to translate a name that also optionally expects a vObj
Click to show internal directories.
Click to hide internal directories.