generic

package
v0.21.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 WithRecorder

func WithRecorder(mapper synccontext.Mapper) synccontext.Mapper

Types

type PhysicalNameFunc

type PhysicalNameFunc func(ctx *synccontext.SyncContext, vName, vNamespace string) string

PhysicalNameFunc is a definition to translate a name

type PhysicalNameWithObjectFunc

type PhysicalNameWithObjectFunc func(ctx *synccontext.SyncContext, vName, vNamespace string, vObj client.Object) string

PhysicalNameWithObjectFunc is a definition to translate a name that also optionally expects a vObj

Jump to

Keyboard shortcuts

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