options

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 9 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 NamespacedOpts added in v0.3.2

type NamespacedOpts struct {
	LocalNamespace  string
	RemoteNamespace string

	LocalClient      kubernetes.Interface
	RemoteClient     kubernetes.Interface
	LocalLiqoClient  liqoclient.Interface
	RemoteLiqoClient liqoclient.Interface

	LocalFactory      informers.SharedInformerFactory
	RemoteFactory     informers.SharedInformerFactory
	LocalLiqoFactory  liqoinformers.SharedInformerFactory
	RemoteLiqoFactory liqoinformers.SharedInformerFactory

	EventBroadcaster record.EventBroadcaster

	Ready          func() bool
	HandlerFactory func(Keyer) cache.ResourceEventHandler
}

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

func NewNamespaced added in v0.3.2

func NewNamespaced() *NamespacedOpts

NewNamespaced returns a new NamespacedOpts object.

func (*NamespacedOpts) WithEventBroadcaster added in v0.3.2

func (ro *NamespacedOpts) WithEventBroadcaster(broadcaster record.EventBroadcaster) *NamespacedOpts

WithEventBroadcaster configures the event broadcaster of the NamespacedOpts.

func (*NamespacedOpts) WithHandlerFactory added in v0.3.2

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

WithHandlerFactory configures the handler factory of the NamespacedOpts.

func (*NamespacedOpts) WithLiqoLocal added in v0.3.2

WithLiqoLocal configures the local liqo client and informer factory parameters of the NamespacedOpts.

func (*NamespacedOpts) WithLiqoRemote added in v0.3.2

WithLiqoRemote configures the remote liqo client and informer factory parameters of the NamespacedOpts.

func (*NamespacedOpts) WithLocal added in v0.3.2

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

WithLocal configures the local parameters of the NamespacedOpts.

func (*NamespacedOpts) WithReadinessFunc added in v0.3.2

func (ro *NamespacedOpts) WithReadinessFunc(ready func() bool) *NamespacedOpts

WithReadinessFunc configures the readiness function of the NamespacedOpts.

func (*NamespacedOpts) WithRemote added in v0.3.2

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

WithRemote configures the remote parameters of the NamespacedOpts.

type ReflectorOpts

type ReflectorOpts struct {
	LocalClient      kubernetes.Interface
	LocalPodInformer corev1informers.PodInformer
	EventBroadcaster record.EventBroadcaster

	HandlerFactory func(Keyer) cache.ResourceEventHandler

	Ready func() bool
}

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

func New

New returns a new ReflectorOpts object.

func (*ReflectorOpts) WithEventBroadcaster added in v0.5.0

func (ro *ReflectorOpts) WithEventBroadcaster(broadcaster record.EventBroadcaster) *ReflectorOpts

WithEventBroadcaster configures the event broadcaster of the NamespacedOpts.

func (*ReflectorOpts) WithHandlerFactory

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

WithHandlerFactory configures the handler factory of the ReflectorOpts.

func (*ReflectorOpts) WithReadinessFunc added in v0.3.2

func (ro *ReflectorOpts) WithReadinessFunc(ready func() bool) *ReflectorOpts

WithReadinessFunc configures the readiness function of the ReflectorOpts.

Jump to

Keyboard shortcuts

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