options

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package options implements the options to configure the reflection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyer

type Keyer func(metadata metav1.Object) types.NamespacedName

Keyer retrieves a NamespacedName referring to the reconciliation target from the object metadata.

type ReflectorOpts

type ReflectorOpts struct {
	LocalNamespace  string
	RemoteNamespace string

	LocalClient  kubernetes.Interface
	RemoteClient kubernetes.Interface

	LocalFactory  informers.SharedInformerFactory
	RemoteFactory informers.SharedInformerFactory

	HandlerFactory func(Keyer) cache.ResourceEventHandler
}

ReflectorOpts is a structure grouping the parameters to start a NamespacedReflector.

func New

func New() *ReflectorOpts

New returns a new ReflectorOpts object.

func (*ReflectorOpts) WithHandlerFactory

func (ro *ReflectorOpts) WithHandlerFactory(handler func(Keyer) cache.ResourceEventHandler) *ReflectorOpts

WithHandlerFactory configures the handler factory of the ReflectorOpts.

func (*ReflectorOpts) WithLocal

func (ro *ReflectorOpts) WithLocal(namespace string, client kubernetes.Interface, factory informers.SharedInformerFactory) *ReflectorOpts

WithLocal configures the local parameters of the ReflectorOpts.

func (*ReflectorOpts) WithRemote

func (ro *ReflectorOpts) WithRemote(namespace string, client kubernetes.Interface, factory informers.SharedInformerFactory) *ReflectorOpts

WithRemote configures the remote parameters of the ReflectorOpts.

Jump to

Keyboard shortcuts

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